forked from GitHub/gf-core
restore the method BracketedString.render which was needed for TranslateApp
This commit is contained in:
@@ -141,6 +141,20 @@ public class PGF {
|
||||
public final native int getFId() /*-{ return this.fid; }-*/;
|
||||
public final native int getIndex() /*-{ return this.index; }-*/;
|
||||
public final native BracketedString[] getChildren() /*-{ return this.children; }-*/;
|
||||
|
||||
public final String render() {
|
||||
if (getToken() != null)
|
||||
return getToken();
|
||||
else {
|
||||
StringBuilder sbuilder = new StringBuilder();
|
||||
for (BracketedString bs : getChildren()) {
|
||||
if (sbuilder.length() > 0)
|
||||
sbuilder.append(' ');
|
||||
sbuilder.append(bs.render());
|
||||
}
|
||||
return sbuilder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TcError extends JavaScriptObject {
|
||||
|
||||
Reference in New Issue
Block a user