Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
switch language by selecting language endonyms, not ISO-631-2 languag…
Browse files Browse the repository at this point in the history
…e codes

new binary

git-svn-id: svn+ssh://hausach.mfo.de/localhome/imaginar/svn/imaginary/jsurfer/branches/JFXSurfer@795 4beaa02c-d2ff-4d45-9dad-6a4a666722bb
  • Loading branch information
stussak committed Jul 20, 2015
1 parent 507af06 commit b93a88e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/de/mfo/jsurfer/fxgui/FXAlgebraicExpressionButtonPanel.fx
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,15 @@ public class FXAlgebraicExpressionButtonPanel
}
after langButtonList[ 0 ];
}

var font : Font = Globals.getJavaFXFont( 30 );

popUp = VBox { blocksMouse: true; }
var langButtonListWithText : Node[] = [];
for( i in [0..langButtonList.size()-1] )
{
// add language code
var code = knownLangs_ISO2[ i ];
var t = Text { content: code font: font };
var messageBundleForCode = java.util.ResourceBundle.getBundle( "de.mfo.jsurfer.fxgui.MessagesBundle", new Locale( code ) );
var t = Text { content: messageBundleForCode.getString( "language" ) font: javafx.scene.text.Font.font( "Arial", 24 ) };
var b : FXButton = langButtonList[ i ] as FXButton;
b.action = function() { language=new java.util.Locale( code );popUp.visible=false; }
insert Stack { content: [ b, t ] } into langButtonListWithText;
Expand Down Expand Up @@ -456,21 +455,19 @@ public class FXAlgebraicExpressionButtonPanel
{
content:
[
javafx.scene.text.Text
{
//x:0.2*fxdLayoutFile.getNode("Button_Language").boundsInLocal.width
y:0.7*fxdLayoutFile.getNode("Button_Language").boundsInLocal.height
font: javafx.scene.text.Font { size: fxdLayoutFile.getNode("Button_Language").boundsInLocal.height * 0.8 }
textAlignment:javafx.scene.text.TextAlignment.CENTER
content: bind language.getLanguage()
javafx.scene.shape.SVGPath {
content: "M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z",
scaleX: 0.020,
scaleY: -0.020,
translateX: -755,
translateY: -614
}
]
//translateX: bind fxdLayoutFile.getNode("Button_Language").boundsInLocal.minX+fxdLayoutFile.getNode("Button_Language").boundsInLocal.width/2-languageText.boundsInLocal.width/2;
translateX: bind fxdLayoutFile.getNode("Button_Language").boundsInLocal.minX+fxdLayoutFile.getNode("Button_Language").translateX+fxdLayoutFile.getNode("Button_Language").boundsInLocal.width/2-languageText.boundsInLocal.width/2.5
translateY: fxdLayoutFile.getNode("Button_Language").boundsInLocal.minY;
}
}

function setTextField2()
{
keyboardTextParameters=javafx.scene.Group
Expand Down
1 change: 1 addition & 0 deletions src/de/mfo/jsurfer/fxgui/MessagesBundle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
language=fallback (en)
variables=Variables
arithmeticOperations=Arithmetic operations
parameters=Parameters
Expand Down

0 comments on commit b93a88e

Please sign in to comment.