Re: [Sugar-devel] Translating etoys home screen

2013-10-09 Thread Chris Leonard
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  wrote:
> On 09.10.2013, at 12:31, Chris Leonard  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.]]]
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Translating etoys home screen

2013-10-09 Thread Chris Leonard
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  wrote:
> On 08.10.2013, at 22:56, Daniel Drake  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
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


Home.pot
Description: Binary data
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Translating etoys home screen

2013-10-09 Thread Chris Leonard
On Wed, Oct 9, 2013 at 5:31 AM, Bert Freudenberg  wrote:
> On 08.10.2013, at 22:56, Daniel Drake  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
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Translating etoys home screen

2013-10-09 Thread Bert Freudenberg
On 08.10.2013, at 22:56, Daniel Drake  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
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Translating etoys home screen

2013-10-08 Thread Daniel Drake
On Tue, Oct 8, 2013 at 4:09 PM, Chris Leonard  wrote:
> Just a quick question Daniel,
>
> The Armenian translations are relatively new and may not have been
> committed.  Are you working directly from the PO files in Pootle or
> the EToys repo?

The PO files I can manage myself. The translations I'm worried about
(the home screen, tutorials, etc) are done outside of PO files :(

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Translating etoys home screen

2013-10-08 Thread Chris Leonard
On Tue, Oct 8, 2013 at 4:56 PM, Daniel Drake  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.
>
> The first step in this translation would be to generate a list of
> strings so that I can pass them on for translation.
>
> Thanks
> Daniel


Just a quick question Daniel,

The Armenian translations are relatively new and may not have been
committed.  Are you working directly from the PO files in Pootle or
the EToys repo?
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel