Make the undo/redo buttons in the main application file translateable
authorAndy Allan <gravitystorm@gmail.com>
Fri, 18 Feb 2011 14:30:38 +0000 (14:30 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Fri, 18 Feb 2011 14:30:38 +0000 (14:30 +0000)
build.xml
l10n/locale/en_GB/p2_main.properties [new file with mode: 0644]
l10n/locale/en_US/p2_main.properties [new file with mode: 0644]
l10n/locale/fr_FR/p2_main.properties [new file with mode: 0644]
l10n/map/LocalizationMap.mxml
potlatch2.mxml

index 305c5d0..f335490 100644 (file)
--- a/build.xml
+++ b/build.xml
 
         <source-path path-element="${basedir}/l10n/locale/@{locale}"/>
         <include-resource-bundles>help_dialog</include-resource-bundles>
+        <include-resource-bundles>p2_main</include-resource-bundles>
 
 <!--        <source-path path-element="${src.dir}/locale/framework/bundles/{locale}/src"/>
         <include-resource-bundles>collections</include-resource-bundles>
diff --git a/l10n/locale/en_GB/p2_main.properties b/l10n/locale/en_GB/p2_main.properties
new file mode 100644 (file)
index 0000000..3ab3593
--- /dev/null
@@ -0,0 +1,4 @@
+# en_GB resources file
+
+main.undo = Undo
+main.redo = Redo
diff --git a/l10n/locale/en_US/p2_main.properties b/l10n/locale/en_US/p2_main.properties
new file mode 100644 (file)
index 0000000..b265c1a
--- /dev/null
@@ -0,0 +1,4 @@
+# en_US resources file
+
+main.undo = Undo
+main.redo = Redo
diff --git a/l10n/locale/fr_FR/p2_main.properties b/l10n/locale/fr_FR/p2_main.properties
new file mode 100644 (file)
index 0000000..9c49558
--- /dev/null
@@ -0,0 +1,4 @@
+# fr_FR resources file
+
+main.undo = Défaire
+main.redo = Refaire
index 861ba06..b9a3d75 100644 (file)
@@ -32,4 +32,9 @@
     <ResourceProxy property="welcome.label" key="help.welcome" />
   </SmartResourceInjector>
 
+  <SmartResourceInjector bundleName="p2_main" target="{potlatch2}">
+    <ResourceProxy property="undo.label" key="main.undo" />
+    <ResourceProxy property="redo.label" key="main.redo" />
+  </SmartResourceInjector>
+
 </LocaleMap>
\ No newline at end of file
index 00eb7b0..aeaa71d 100644 (file)
                        </mx:dataProvider>
                </mx:PopUpMenuButton>
         <mx:Spacer width="100%"/>
-        <mx:Button label="Undo" click="MainUndoStack.getGlobalStack().undo();" styleName="appBarButton"
+        <mx:Button id="undo" label="Undo" click="MainUndoStack.getGlobalStack().undo();" styleName="appBarButton"
             enabled="{MainUndoStack.getGlobalStack().canUndo()}"
             toolTip="{MainUndoStack.getGlobalStack().getUndoDescription() ? 'Undo '+MainUndoStack.getGlobalStack().getUndoDescription() : 'Undo last action'}" />
-        <mx:Button label="Redo" click="MainUndoStack.getGlobalStack().redo();" styleName="appBarButton"
+        <mx:Button id="redo" label="Redo" click="MainUndoStack.getGlobalStack().redo();" styleName="appBarButton"
             enabled="{MainUndoStack.getGlobalStack().canRedo()}"/>
         <mx:Spacer width="100%"/>
         <mx:Button label="Help" click="new HelpDialog().init();" styleName="appBarButton" />