Translation of strings with arguments

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Translation of strings with arguments

Bert Freudenberg
Hi folks,

I just noticed a problem in the new strings for translation. This way of assembling a string makes it very hard for translators:

    attachmentEdgeString
        ^ 'choose attachment edge'  translated, ' (', 'now' translated, ' ', attachmentEdge asString translated, ')'

The proper way would be using the #format: message:

    attachmentEdgeString
        ^ 'choose attachment edge (now {1})' translated format: {attachmentEdge asString translated}

Below are three instances of this problem I noticed, but possibly there are more - you know best what you added, so please fix it, too ;)

- Bert -

==============================

+#: Etoys-Scripting_Support,FollowingWatcher>>addCustomMenuItems:hand:
+msgid "currently"
+msgstr ""
+
+#: Etoys-Scripting_Support,FollowingWatcher>>addCustomMenuItems:hand:,FollowingWatcher>>chooseOffset
+msgid "offset"
+msgstr ""
+
+#: Etoys-Scripting_Support,FollowingWatcher>>attachmentEdgeString
+msgid "choose attachment edge"
+msgstr ""
+
+#: Etoys-Scripting_Support,FollowingWatcher>>attachmentEdgeString
+msgid "now"
+msgstr ""
+

+#: Etoys-Scripting,NewVariableDialogMorph>>askUserForNewType
+msgid ""
+"Choose the TYPE\n"
+"for {1}\n"
 msgstr ""
 
+#: Etoys-Scripting,NewVariableDialogMorph>>askUserForNewType
+msgid ""
+"\n"
+"(currently {2})"
+msgstr ""
+




_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Translation of strings with arguments

Ricardo Moran

On Tue, Mar 6, 2012 at 11:42 AM, Bert Freudenberg <[hidden email]> wrote:
(...)

+#: Etoys-Scripting,NewVariableDialogMorph>>askUserForNewType
+msgid ""
+"Choose the TYPE\n"
+"for {1}\n"
 msgstr ""

+#: Etoys-Scripting,NewVariableDialogMorph>>askUserForNewType
+msgid ""
+"\n"
+"(currently {2})"
+msgstr ""
+


Hi, I don't think these last two need to be fixed. I copied them from the old implementation in Player>>chooseSlotTypeFor: so we should already have translations available for them.

Richo


 



_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev


_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Translation of strings with arguments

Scott Wallace
On Mar 6, 2012, at 6:53 AM, Ricardo Moran wrote:
On Tue, Mar 6, 2012 at 11:42 AM, Bert Freudenberg <[hidden email]> wrote:
(...)
+#: Etoys-Scripting,NewVariableDialogMorph>>askUserForNewType
+msgid ""
+"Choose the TYPE\n"
+"for {1}\n"
 msgstr ""

+#: Etoys-Scripting,NewVariableDialogMorph>>askUserForNewType
+msgid ""
+"\n"
+"(currently {2})"
+msgstr ""

Hi, I don't think these last two need to be fixed. I copied them from the old implementation in Player>>chooseSlotTypeFor: so we should already have translations available for them.

Richo


… and as for the others,

+#: Etoys-Scripting_Support,FollowingWatcher>>addCustomMenuItems:hand:
+msgid "currently"
+msgstr ""
+
+#: Etoys-Scripting_Support,FollowingWatcher>>addCustomMenuItems:hand:,FollowingWatcher>>chooseOffset
+msgid "offset"
+msgstr ""
+
+#: Etoys-Scripting_Support,FollowingWatcher>>attachmentEdgeString
+msgid "choose attachment edge"
+msgstr ""
+
+#: Etoys-Scripting_Support,FollowingWatcher>>attachmentEdgeString
+msgid "now"
+msgstr ""


… darn, old habits sneaking back again.  I'll fix :)

Thank you, Bert!

  -- Scott

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev