On 08.10.2013, at 22:56, Daniel Drake <[hidden email]> wrote:
> Hi Bert, > > Could you advise on how we could translate the etoys home screen to Armenian? > > I see: > > http://forum.world.st/How-to-translate-strings-in-Home-pr-td3527757.html > > However the crucial "how to translate" link there is broken. Ah, that's on the old wiki: http://oldwiki.squeakland.org/display/sq/How+to+translate+Projects Would be great if someone could make a more thorough step-by-step guide, like the one for the help system: http://oldwiki.squeakland.org/display/sq/How+to+translate+the+Quick+Guides However, these are different in that a separate project is used per language and loaded on demand, whereas for the home-screen (and projects in general) all the translations live in a single project together. > The first step in this translation would be to generate a list of > strings so that I can pass them on for translation. Yes. Unfortunately our in-project translation is not set up for gettext, and the home screen is just a project as far as the system is concerned. Once you have changed the home screen project, you need to switch to the hidden "Unnamed1" project (via ctrl-shift-w) and save the etoys image. - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Wed, Oct 9, 2013 at 5:31 AM, Bert Freudenberg <[hidden email]> wrote:
> On 08.10.2013, at 22:56, Daniel Drake <[hidden email]> wrote: > >> Hi Bert, >> >> Could you advise on how we could translate the etoys home screen to Armenian? >> >> I see: >> >> http://forum.world.st/How-to-translate-strings-in-Home-pr-td3527757.html >> >> However the crucial "how to translate" link there is broken. > > Ah, that's on the old wiki: > http://oldwiki.squeakland.org/display/sq/How+to+translate+Projects > > Would be great if someone could make a more thorough step-by-step guide, like the one for the help system: > > http://oldwiki.squeakland.org/display/sq/How+to+translate+the+Quick+Guides > > However, these are different in that a separate project is used per language and loaded on demand, whereas for the home-screen (and projects in general) all the translations live in a single project together. > >> The first step in this translation would be to generate a list of >> strings so that I can pass them on for translation. > > > Yes. Unfortunately our in-project translation is not set up for gettext, and the home screen is just a project as far as the system is concerned. > > Once you have changed the home screen project, you need to switch to the hidden "Unnamed1" project (via ctrl-shift-w) and save the etoys image. > > - Bert - > Just a thought, Since I think it is only three strings (that don't change often) , it would be very easy to dummy up a POT file for posting in Poolte. Admittedly, that translated PO would need to be manually transferred into individual .pr files by language; but at least the strings would be collected. cjl _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Bert Freudenberg
Bert,
Would this POT capture everything that is needed? I can add it to Templates in Etoys and propagate it across langs. If you set it up in an SVN directory, we could even work on pushing it to your repo, in the meantime, it would at least be in Pootle. On Wed, Oct 9, 2013 at 5:31 AM, Bert Freudenberg <[hidden email]> wrote: > On 08.10.2013, at 22:56, Daniel Drake <[hidden email]> wrote: > >> Hi Bert, >> >> Could you advise on how we could translate the etoys home screen to Armenian? >> >> I see: >> >> http://forum.world.st/How-to-translate-strings-in-Home-pr-td3527757.html >> >> However the crucial "how to translate" link there is broken. > > Ah, that's on the old wiki: > http://oldwiki.squeakland.org/display/sq/How+to+translate+Projects > > Would be great if someone could make a more thorough step-by-step guide, like the one for the help system: > > http://oldwiki.squeakland.org/display/sq/How+to+translate+the+Quick+Guides > > However, these are different in that a separate project is used per language and loaded on demand, whereas for the home-screen (and projects in general) all the translations live in a single project together. > >> The first step in this translation would be to generate a list of >> strings so that I can pass them on for translation. > > > Yes. Unfortunately our in-project translation is not set up for gettext, and the home screen is just a project as far as the system is concerned. > > Once you have changed the home screen project, you need to switch to the hidden "Unnamed1" project (via ctrl-shift-w) and save the etoys image. > > - Bert - > > > _______________________________________________ > Sugar-devel mailing list > [hidden email] > http://lists.sugarlabs.org/listinfo/sugar-devel _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev Home.pot (718 bytes) Download Attachment |
On 09.10.2013, at 12:31, Chris Leonard <[hidden email]> wrote:
> Bert, > > Would this POT capture everything that is needed? > > I can add it to Templates in Etoys and propagate it across langs. > > If you set it up in an SVN directory, we could even work on pushing it > to your repo, in the meantime, it would at least be in Pootle. I'm attaching a zip resulting from running the snippet below which exports all translated strings from a project. In theory that could be used to automate project translations in the future. And if someone makes the gallery and tutorial projects translatable (by turning on the "translatable" property on the right strings and providing one translation at least) we could use the snippet to gather those strings, too. - Bert - | original translations msgids msgid msgstr ext | original := LocaleID isoString: 'en'. translations := Dictionary new. msgids := Dictionary new. World allMorphs do: [:m | (m isTextMorph and: [m translatable]) ifTrue: [ msgid := (m translations at: original) asString. msgids at: m externalName put: msgid. m translations keysAndValuesDo: [:k :v | (translations at: k ifAbsentPut: [Dictionary new]) at: msgid put: v asString]]]. translations keysAndValuesDo: [:locale :trans | ext := locale = original ifTrue: ['.pot'] ifFalse: ['-', locale asString,'.po']. FileStream fileNamed: 'Project-', Project current name, ext do: [:f | f lineEndConvention: #lf. msgids keys asSortedCollection do: [:name | msgid := msgids at: name. msgstr := trans at: msgid. locale = original ifTrue: [msgstr := '']. f nextPutAll: '#: ', Project current name, '.pr ', name; cr. f nextPutAll: 'msgid "', (msgid copyReplaceAll: String cr with: '\n'), '"'; cr. f nextPutAll: 'msgstr "', (msgstr copyReplaceAll: String cr with: '\n'), '"'; cr. f cr.]]] _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev Project-Home-PO.zip (3K) Download Attachment |
The POT in the zip has been uploaded to Templates and propagated across langs.
Project-Home.pot The following langs have been populated with the provided strings: de, es, fr, ja, pt, pt_BR, zh_CN I will also do the three English variants (en, en_US, en_GB). So at least now there is a means of capturing the strings in Pootle via translating the Project-Home.po for a given language. Building the .pr is left as a manual process for the moment. Daniel, ask the Armenian team translate these few words: http://translate.sugarlabs.org/hy/etoys_new/ On Wed, Oct 9, 2013 at 7:52 AM, Bert Freudenberg <[hidden email]> wrote: > On 09.10.2013, at 12:31, Chris Leonard <[hidden email]> wrote: > >> Bert, >> >> Would this POT capture everything that is needed? >> >> I can add it to Templates in Etoys and propagate it across langs. >> >> If you set it up in an SVN directory, we could even work on pushing it >> to your repo, in the meantime, it would at least be in Pootle. > > > I'm attaching a zip resulting from running the snippet below which exports all translated strings from a project. In theory that could be used to automate project translations in the future. And if someone makes the gallery and tutorial projects translatable (by turning on the "translatable" property on the right strings and providing one translation at least) we could use the snippet to gather those strings, too. > > - Bert - > > | original translations msgids msgid msgstr ext | > original := LocaleID isoString: 'en'. > translations := Dictionary new. > msgids := Dictionary new. > World allMorphs do: [:m | (m isTextMorph and: [m translatable]) ifTrue: [ > msgid := (m translations at: original) asString. > msgids at: m externalName put: msgid. > m translations keysAndValuesDo: [:k :v | > (translations at: k ifAbsentPut: [Dictionary new]) > at: msgid put: v asString]]]. > translations keysAndValuesDo: [:locale :trans | > ext := locale = original ifTrue: ['.pot'] ifFalse: ['-', locale asString,'.po']. > FileStream fileNamed: 'Project-', Project current name, ext do: [:f | > f lineEndConvention: #lf. > msgids keys asSortedCollection do: [:name | > msgid := msgids at: name. > msgstr := trans at: msgid. > locale = original ifTrue: [msgstr := '']. > f nextPutAll: '#: ', Project current name, '.pr ', name; cr. > f nextPutAll: 'msgid "', (msgid copyReplaceAll: String cr with: '\n'), '"'; cr. > f nextPutAll: 'msgstr "', (msgstr copyReplaceAll: String cr with: '\n'), '"'; cr. > f cr.]]] > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |