Examples of Translation


Examples of com.codiform.moo.annotation.Translation

  public String getName() {
    return name;
  }

  public String getTranslationExpression() {
    Translation translationAnnotation = getAnnotation(Translation.class);
    if (translationAnnotation != null) {
      return translationAnnotation.value();
    } else {
      return name;
    }
  }
View Full Code Here

Examples of com.codiform.moo.annotation.Translation

  public String getName() {
    return field.getName();
  }

  public String getTranslationExpression() {
    Translation translationAnnotation = getAnnotation(Translation.class);
    if (translationAnnotation != null) {
      return translationAnnotation.value();
    } else {
      return field.getName();
    }
  }
View Full Code Here

Examples of com.dubture.symfony.core.model.Translation

  @Override
  public String getInfo(IProgressMonitor monitor) {
    try {
     
      Translation translation = (Translation) getModelElement();     
     
      SymfonyModelAccess model = SymfonyModelAccess.getDefault();
      List<TransUnit> units = model.findTranslations(translation);
     
      String html = HTMLUtils.translation2Html(translation, units);
     
      if (html != null && html.length() > 0)
        return html;
     
      return translation.getElementName();
     
     
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of com.dubture.symfony.core.model.Translation

      if (targetBundle.getScriptProject() == null) {
        targetBundle.setProject(project);
      }

      if (targetBundle != null && CodeAssistUtils.startsWithIgnoreCase(unit.name, prefix)) {
        Translation trans = new Translation(targetBundle,unit);       
        reporter.reportType(trans, "", range)
      }
    }     

  }
View Full Code Here

Examples of com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation

        assertEquals("2", affects.getAgencyId());
      }
      TranslatedString header = alert.getHeaderText();
      assertEquals(2, header.getTranslationCount());
      {
        Translation translation = header.getTranslation(0);
        assertEquals("Name", translation.getText());
        assertEquals("en", translation.getLanguage());
      }
      {
        Translation translation = header.getTranslation(1);
        assertEquals("Nombre", translation.getText());
        assertEquals("es", translation.getLanguage());
      }
      TranslatedString description = alert.getDescriptionText();
      assertEquals(2, description.getTranslationCount());
      {
        Translation translation = description.getTranslation(0);
        assertEquals("Description", translation.getText());
        assertEquals("en", translation.getLanguage());
      }
      {
        Translation translation = description.getTranslation(1);
        assertEquals("Descripción", translation.getText());
        assertEquals("es", translation.getLanguage());
      }
    }
    {
      FeedEntity entity = feed.getEntity(1);
      assertEquals("2", entity.getId());
View Full Code Here

Examples of com.liferay.portlet.translator.model.Translation

    _translationId = translationId;
    _fromText = fromText;
  }

  public Object convert(String id) throws ConverterException {
    Translation translation = new Translation(_translationId, _fromText);

    try {
      StringBuffer url = new StringBuffer();
      url.append("http://babelfish.altavista.com/babelfish/tr?doit=done");
      url.append("&urltext=").append(Http.encodeURL(_fromText));
      url.append("&lp=").append(_translationId);

      String text = Http.URLtoString(new URL(url.toString()));

      int begin = text.indexOf("<div style=padding:10px;>") + 25;
      int end = text.indexOf("</div>", begin);

      String toText = text.substring(begin, end).trim();
      toText = StringUtil.replace(toText, "\n", " ");

      translation.setToText(toText);
    }
    catch (Exception e) {
      throw new ConverterException(e);
    }
View Full Code Here

Examples of com.liferay.portlet.translator.model.Translation

    try {
      String translationId = ParamUtil.getString(req, "id");
      String fromText = ParamUtil.getString(req, "text");

      if (Validator.isNotNull(fromText)) {
        Translation translation =
          TranslatorUtil.getTranslation(translationId, fromText);

        req.setAttribute(WebKeys.TRANSLATOR_TRANSLATION, translation);
      }
    }
View Full Code Here

Examples of com.liferay.portlet.translator.model.Translation

    try {
      WebCacheable wc =
        new TranslationConverter(translationId, fromText);

      Translation translation = (Translation)wc.convert("");

      toText = translation.getToText();

      if ((toText != null) &&  (toText.indexOf("Babel") != -1)) {
        Logger.info(this, "Please manually check for errors.");
      }
    }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Translation

          PathSprite shadow = new PathSprite();
          Sprite shadowAttr = shadowAttributes.get(i);
          shadow.setStrokeWidth(shadowAttr.getStrokeWidth());
          shadow.setStrokeOpacity(shadowAttr.getStrokeOpacity());
          shadow.setStroke(shadowAttr.getStroke());
          shadow.setTranslation(new Translation(shadowAttr.getTranslation()));
          shadow.setFill(Color.NONE);
          shadow.setCommands(radar.getCommands());
          chart.addSprite(shadow);
          radarShadows.add(shadow);
        }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Translation

   *
   * @param x the translation on the x-axis
   * @param y the translation on the y-axis
   */
  public void setTranslation(double x, double y) {
    setTranslation(new Translation(x, y));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.