Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Daniel Narvaez
We want each activity to have a different origin, several web APIs depends
on that.

http://www.w3.org/Security/wiki/Same_Origin_Policy


On 6 June 2013 21:11, Gonzalo Odiard  wrote:

> This is for the use of activity:// uri scheme, right?
> I don't understand yet why is needed. Is due to limitations on the use of
> file:// ?
>
> Gonzalo
>
>
> On Thu, Jun 6, 2013 at 4:01 PM, Daniel Narvaez wrote:
>
>> The sugar-web bits have landed. I used it to  implement translations in
>> sugar-web-template but it turns out using multiple translation files we
>> trigger a webkit bug. SIgh.
>>
>> https://bugs.webkit.org/show_bug.cgi?id=117313
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>


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


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Gonzalo Odiard
This is for the use of activity:// uri scheme, right?
I don't understand yet why is needed. Is due to limitations on the use of
file:// ?

Gonzalo


On Thu, Jun 6, 2013 at 4:01 PM, Daniel Narvaez  wrote:

> The sugar-web bits have landed. I used it to  implement translations in
> sugar-web-template but it turns out using multiple translation files we
> trigger a webkit bug. SIgh.
>
> https://bugs.webkit.org/show_bug.cgi?id=117313
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Daniel Narvaez
The sugar-web bits have landed. I used it to  implement translations in
sugar-web-template but it turns out using multiple translation files we
trigger a webkit bug. SIgh.

https://bugs.webkit.org/show_bug.cgi?id=117313
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Daniel Narvaez
On Thursday, 6 June 2013, Simon Schampijer wrote:

> On 06/06/2013 11:34 AM, Daniel Narvaez wrote:
>
>> On Thursday, 6 June 2013, Simon Schampijer wrote:
>>
>>  On 06/06/2013 01:17 AM, Daniel Narvaez wrote:
>>>
>>>  Hello,

 I setup a fork of webL10n. I amdified it and replaced API with the gaia
 one
 minus the b2g specific stuff.

 https://github.com/sugarlabs/webL10n
 
 >


>>> I do not see any changes from you there, why do we need the for again?
>>>
>>>
>> They are on the sugar-web branch. You mean why we need the changes? Couple
>> of reasons, to make it work well with requirejs and to get a better public
>> API (the same gaia is using). This code is sort of thought to be forked,
>> mozilla are forking it themself despite being the upstream in practice.
>>
>
> Oh, ok - did not see the branch. Thanks, gets clearer now.
>
> /me has not seen as many forks and copy-pastes as in the last weeks


Welcome to the magic world of JavaScript!!




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


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Simon Schampijer

On 06/06/2013 11:38 AM, Daniel Narvaez wrote:

I'm not sure they really need to be on a branch btw. I've doing that to
keep master the same of upstream. But maybe fetching the upstream repo on
another remote gives everything you need.


Yes, maybe using the master branch for the changes is a bit more clear, 
and then pull upstream into a separate branch.


Simon

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


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Simon Schampijer

On 06/06/2013 11:34 AM, Daniel Narvaez wrote:

On Thursday, 6 June 2013, Simon Schampijer wrote:


On 06/06/2013 01:17 AM, Daniel Narvaez wrote:


Hello,

I setup a fork of webL10n. I amdified it and replaced API with the gaia
one
minus the b2g specific stuff.

https://github.com/sugarlabs/**webL10n



I do not see any changes from you there, why do we need the for again?



They are on the sugar-web branch. You mean why we need the changes? Couple
of reasons, to make it work well with requirejs and to get a better public
API (the same gaia is using). This code is sort of thought to be forked,
mozilla are forking it themself despite being the upstream in practice.


Oh, ok - did not see the branch. Thanks, gets clearer now.

/me has not seen as many forks and copy-pastes as in the last weeks



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


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Daniel Narvaez
I'm not sure they really need to be on a branch btw. I've doing that to
keep master the same of upstream. But maybe fetching the upstream repo on
another remote gives everything you need.

On Thursday, 6 June 2013, Daniel Narvaez wrote:

> On Thursday, 6 June 2013, Simon Schampijer wrote:
>
>> On 06/06/2013 01:17 AM, Daniel Narvaez wrote:
>>
>>> Hello,
>>>
>>> I setup a fork of webL10n. I amdified it and replaced API with the gaia
>>> one
>>> minus the b2g specific stuff.
>>>
>>> https://github.com/sugarlabs/**webL10n
>>>
>>
>> I do not see any changes from you there, why do we need the for again?
>>
>
> They are on the sugar-web branch. You mean why we need the changes? Couple
> of reasons, to make it work well with requirejs and to get a better public
> API (the same gaia is using). This code is sort of thought to be forked,
> mozilla are forking it themself despite being the upstream in practice.
>
>
> --
> Daniel Narvaez
>
>

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


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Daniel Narvaez
On Thursday, 6 June 2013, Simon Schampijer wrote:

> On 06/06/2013 01:17 AM, Daniel Narvaez wrote:
>
>> Hello,
>>
>> I setup a fork of webL10n. I amdified it and replaced API with the gaia
>> one
>> minus the b2g specific stuff.
>>
>> https://github.com/sugarlabs/**webL10n
>>
>
> I do not see any changes from you there, why do we need the for again?
>

They are on the sugar-web branch. You mean why we need the changes? Couple
of reasons, to make it work well with requirejs and to get a better public
API (the same gaia is using). This code is sort of thought to be forked,
mozilla are forking it themself despite being the upstream in practice.


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


Re: [Sugar-devel] Web activities and i10n

2013-06-06 Thread Simon Schampijer

On 06/06/2013 01:17 AM, Daniel Narvaez wrote:

Hello,

I setup a fork of webL10n. I amdified it and replaced API with the gaia one
minus the b2g specific stuff.

https://github.com/sugarlabs/webL10n


I do not see any changes from you there, why do we need the for again?

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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
On 6 June 2013 01:17, Daniel Narvaez  wrote:

> Left to do
>
> * The naming of the .js file is sometimes l10n.js (which is what I want),
> sometimes webL10n.js. Let's see what we get when it's pulled from git, if
> it's wrong I'll have to understand the volo logic exactly.
> * Document how to use this, suggest a directory where to put .properties.
> * Write pootle hooks to convert po <-> properties. Perhaps we don't need
> to do that until we actually have activities to translate.
>

* Translate sugar-web-template

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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
Hello,

I setup a fork of webL10n. I amdified it and replaced API with the gaia one
minus the b2g specific stuff.

https://github.com/sugarlabs/webL10n

I sent a pull request to integrate this in sugar-web.

https://github.com/sugarlabs/sugar-web/pull/38

Left to do

* The naming of the .js file is sometimes l10n.js (which is what I want),
sometimes webL10n.js. Let's see what we get when it's pulled from git, if
it's wrong I'll have to understand the volo logic exactly.
* Document how to use this, suggest a directory where to put .properties.
* Write pootle hooks to convert po <-> properties. Perhaps we don't need to
do that until we actually have activities to translate.

Happy I don't have to touch bundlebuilder :)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Chris Leonard
On Wed, Jun 5, 2013 at 6:29 PM, Daniel Narvaez  wrote:

> That's very interesting.
>
> I suspect they are using hooks to perform the conversion with po2moz and
> moz2po. That might actually be a better approach then doing the conversion
> in bundlebuilder. It keeps the source cleaner.
>
> Which pootle version are we running?
>
>
We are on Pootle 2.0.5  powered by Translate Toolkit 1.7.0 which is several
versions behind the current  Pootle 2.5.1-alpha1 powered by Translate
Toolkit 1.10.0

I've tried recruiting help with upgrading our server (it is beyond my
personal sysadmin-fu), but I keep on loosing my volunteers before they get
started.

Fortunately for me, (unfortunately for Sugar Labs), I am very busy with a
new job as Science Officer for the Batten Disease Support and Research
Association (a rare childhood disease patient advocacy group) and in the
midst of a major grant review project that will take most of my time
through the summer.

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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
That's very interesting.

I suspect they are using hooks to perform the conversion with po2moz and
moz2po. That might actually be a better approach then doing the conversion
in bundlebuilder. It keeps the source cleaner.

Which pootle version are we running?


On 5 June 2013 23:40, Chris Leonard  wrote:

> It might be an idea to ask on the Pootle list.
>
> https://lists.sourceforge.net/lists/listinfo/translate-pootle
>
> The same folks make the Translate Toolkit (moz2po, etc.) and I think
> they've had some funding from Mozilla as they are hosting the server below
> on Mozilla's behalf, which is definitely at the most current version.  It
> is possible that a Pootle upgrade my get us some features they developed
> for Mozilla.
>
> http://mozilla.locamotion.org/
>
> Pootle 2.5.1-alpha1 is powered by Translate Toolkit 1.10.0
>
> cjl
>
>
>
>
> On Wed, Jun 5, 2013 at 4:26 PM, Daniel Narvaez wrote:
>
>> I played with the tools. moz2po seems to work, but po2moz is not working.
>> I opened a bug
>>
>> http://bugs.locamotion.org/show_bug.cgi?id=2996
>>
>> Bit surprised because it seems mozilla is using these tools... maybe they
>> didn't upgrade to 1.10 yet.
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>


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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Chris Leonard
It might be an idea to ask on the Pootle list.

https://lists.sourceforge.net/lists/listinfo/translate-pootle

The same folks make the Translate Toolkit (moz2po, etc.) and I think
they've had some funding from Mozilla as they are hosting the server below
on Mozilla's behalf, which is definitely at the most current version.  It
is possible that a Pootle upgrade my get us some features they developed
for Mozilla.

http://mozilla.locamotion.org/

Pootle 2.5.1-alpha1 is powered by Translate Toolkit 1.10.0

cjl




On Wed, Jun 5, 2013 at 4:26 PM, Daniel Narvaez  wrote:

> I played with the tools. moz2po seems to work, but po2moz is not working.
> I opened a bug
>
> http://bugs.locamotion.org/show_bug.cgi?id=2996
>
> Bit surprised because it seems mozilla is using these tools... maybe they
> didn't upgrade to 1.10 yet.
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
I played with the tools. moz2po seems to work, but po2moz is not working. I
opened a bug

http://bugs.locamotion.org/show_bug.cgi?id=2996

Bit surprised because it seems mozilla is using these tools... maybe they
didn't upgrade to 1.10 yet.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
The developer needs to provide a reference translation (so one of the
files), then one file per translation will be generated by the build.


On 5 June 2013 21:11, Gonzalo Odiard  wrote:

> The developer need provide a .properties file or is this generated in a
> automatic way?
> If is generated, may be we can put it in the po directory?
>
> Gonzalo
>
>
> On Wed, Jun 5, 2013 at 3:32 PM, Daniel Narvaez wrote:
>
>> I was thinking we would not have locale for web activities so it wouldn't
>> be confusing. Though I just realised we will actually have it for the
>> linfo. So yeah locales is not good. I can't think of a good name though...
>> translations/? weblocales?
>>
>> On Wednesday, 5 June 2013, Gonzalo Odiard wrote:
>>
>>> On Wed, Jun 5, 2013 at 2:34 PM, Daniel Narvaez wrote:
>>>
 We discussed this in irc a bit more. The plan is to fork webL10N to
 make it an amd module. Activity authors will provide a reference
 translation in locales/, bundlebuilder will generate a .pot from it. When
 building a xo or installing, bundlebuilder will also convert .po files to
 .properties.


>>> Is "locales" a fixed directory? We already have "locale", generated with
>>> the data from the po files,
>>> can be confusing. May be you can change the directory name?
>>>
>>> Gonzalo
>>>
>>
>>
>> --
>> Daniel Narvaez
>>
>>
>


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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Gonzalo Odiard
The developer need provide a .properties file or is this generated in a
automatic way?
If is generated, may be we can put it in the po directory?

Gonzalo


On Wed, Jun 5, 2013 at 3:32 PM, Daniel Narvaez  wrote:

> I was thinking we would not have locale for web activities so it wouldn't
> be confusing. Though I just realised we will actually have it for the
> linfo. So yeah locales is not good. I can't think of a good name though...
> translations/? weblocales?
>
> On Wednesday, 5 June 2013, Gonzalo Odiard wrote:
>
>> On Wed, Jun 5, 2013 at 2:34 PM, Daniel Narvaez wrote:
>>
>>> We discussed this in irc a bit more. The plan is to fork webL10N to make
>>> it an amd module. Activity authors will provide a reference translation in
>>> locales/, bundlebuilder will generate a .pot from it. When building a xo or
>>> installing, bundlebuilder will also convert .po files to .properties.
>>>
>>>
>> Is "locales" a fixed directory? We already have "locale", generated with
>> the data from the po files,
>> can be confusing. May be you can change the directory name?
>>
>> Gonzalo
>>
>
>
> --
> Daniel Narvaez
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
I was thinking we would not have locale for web activities so it wouldn't
be confusing. Though I just realised we will actually have it for the
linfo. So yeah locales is not good. I can't think of a good name though...
translations/? weblocales?

On Wednesday, 5 June 2013, Gonzalo Odiard wrote:

> On Wed, Jun 5, 2013 at 2:34 PM, Daniel Narvaez 
> 
> > wrote:
>
>> We discussed this in irc a bit more. The plan is to fork webL10N to make
>> it an amd module. Activity authors will provide a reference translation in
>> locales/, bundlebuilder will generate a .pot from it. When building a xo or
>> installing, bundlebuilder will also convert .po files to .properties.
>>
>>
> Is "locales" a fixed directory? We already have "locale", generated with
> the data from the po files,
> can be confusing. May be you can change the directory name?
>
> Gonzalo
>


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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Gonzalo Odiard
On Wed, Jun 5, 2013 at 2:34 PM, Daniel Narvaez  wrote:

> We discussed this in irc a bit more. The plan is to fork webL10N to make
> it an amd module. Activity authors will provide a reference translation in
> locales/, bundlebuilder will generate a .pot from it. When building a xo or
> installing, bundlebuilder will also convert .po files to .properties.
>
>
Is "locales" a fixed directory? We already have "locale", generated with
the data from the po files,
can be confusing. May be you can change the directory name?

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


Re: [Sugar-devel] Web activities and i10n

2013-06-05 Thread Daniel Narvaez
We discussed this in irc a bit more. The plan is to fork webL10N to make it
an amd module. Activity authors will provide a reference translation in
locales/, bundlebuilder will generate a .pot from it. When building a xo or
installing, bundlebuilder will also convert .po files to .properties.

I tried to hook up the js lib and it seems to work fine. I'm not sure how
webkit chooses the language, LANG doesn't seem to affect it even if the
code is using LC_ALL... but I'm sure we can figure it out.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-03 Thread Walter Bender
CC'ing CJL

On Mon, Jun 3, 2013 at 6:48 PM, Daniel Narvaez  wrote:
> Not sure where to put properties files (both reference and translated).
> Perhaps we could just follow mozilla and have them in the locales/
> directory. It's a bit too similar to locale, which we are using to generate
> translations for native activities but it shouldn't be too confusing since
> for web activities that directory shouldn't exist.
>
>
> On 4 June 2013 00:21, Daniel Narvaez  wrote:
>>
>> We could have activity authors provide the reference properties files in
>> the locale directory. Bundle builder would generate the pot file from those
>> using
>>
>> prop2po -P
>>
>> When building the xo bundle, it would then generate translated properties
>> files using
>>
>> po2prop -t
>>
>> It seems like it should work and no real code to write other than the
>> build bits :)
>>
>>
>>
>>
>>
>> On 4 June 2013 00:05, Daniel Narvaez  wrote:
>>>
>>> Well, Jed apparently requires converting po to json too, so we won't save
>>> on the build bits. It probably doesn't solve the problem of extracting
>>> translatable strings either.
>>>
>>>
>>> On 4 June 2013 00:00, Daniel Narvaez  wrote:

 An alternative could be to combine webL10N and Jed

 http://slexaxton.github.io/Jed/

 Either adapt webL10N to use Jed or add the dom bits of webL10N to Jed.
 The webL10N code is pretty simple, so it might easier then figuring out how
 to setup the prop2po build bits.


 On 3 June 2013 23:20, Daniel Narvaez  wrote:
>
> I had a look at the code and I don't see anything firefox specific, I
> suspect the full API will work on latest webkit (they try to support 
> really
> old browsers and that's probably where they only support a basic API).
>
> The thing I'm not convinced about is using .properties files. But
> unless we can find a library which uses gettext and support translating
> html... perhaps we can just use prop2po.
>
>
> On 3 June 2013 22:56, Daniel Narvaez  wrote:
>>
>> Hello,
>>
>> we didn't really think about how to support translations of the web
>> activities. This is how mozilla is doing it
>>
>> https://github.com/fabi1cazenave/webL10n
>>
>> It claims to be cross browsers but they have a "modern" API which is
>> firefox only. I'm not sure what that exactly mean, but a basic API is
>> probably better than having to write our own thing.
>>
>> They use ini files, but there are tools to convert to and from po
>> files.
>>
>>
>> http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po
>>
>> --
>> Daniel Narvaez
>
>
>
>
> --
> Daniel Narvaez




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



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Web activities and i10n

2013-06-03 Thread Daniel Narvaez
Not sure where to put properties files (both reference and translated).
Perhaps we could just follow mozilla and have them in the locales/
directory. It's a bit too similar to locale, which we are using to generate
translations for native activities but it shouldn't be too confusing since
for web activities that directory shouldn't exist.


On 4 June 2013 00:21, Daniel Narvaez  wrote:

> We could have activity authors provide the reference properties files in
> the locale directory. Bundle builder would generate the pot file from those
> using
>
> prop2po -P
>
> When building the xo bundle, it would then generate translated properties
> files using
>
> po2prop -t
>
> It seems like it should work and no real code to write other than the
> build bits :)
>
>
>
>
>
> On 4 June 2013 00:05, Daniel Narvaez  wrote:
>
>> Well, Jed apparently requires converting po to json too, so we won't save
>> on the build bits. It probably doesn't solve the problem of extracting
>> translatable strings either.
>>
>>
>> On 4 June 2013 00:00, Daniel Narvaez  wrote:
>>
>>> An alternative could be to combine webL10N and Jed
>>>
>>> http://slexaxton.github.io/Jed/
>>>
>>> Either adapt webL10N to use Jed or add the dom bits of webL10N to Jed.
>>> The webL10N code is pretty simple, so it might easier then figuring out how
>>> to setup the prop2po build bits.
>>>
>>>
>>> On 3 June 2013 23:20, Daniel Narvaez  wrote:
>>>
 I had a look at the code and I don't see anything firefox specific, I
 suspect the full API will work on latest webkit (they try to support really
 old browsers and that's probably where they only support a basic API).

 The thing I'm not convinced about is using .properties files. But
 unless we can find a library which uses gettext and support translating
 html... perhaps we can just use prop2po.


 On 3 June 2013 22:56, Daniel Narvaez  wrote:

> Hello,
>
> we didn't really think about how to support translations of the web
> activities. This is how mozilla is doing it
>
> https://github.com/fabi1cazenave/webL10n
>
> It claims to be cross browsers but they have a "modern" API which is
> firefox only. I'm not sure what that exactly mean, but a basic API is
> probably better than having to write our own thing.
>
> They use ini files, but there are tools to convert to and from po
> files.
>
>
> http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po
>
> --
> Daniel Narvaez
>



 --
 Daniel Narvaez

>>>
>>>
>>>
>>> --
>>> Daniel Narvaez
>>>
>>
>>
>>
>> --
>> Daniel Narvaez
>>
>
>
>
> --
> Daniel Narvaez
>



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


Re: [Sugar-devel] Web activities and i10n

2013-06-03 Thread Daniel Narvaez
We could have activity authors provide the reference properties files in
the locale directory. Bundle builder would generate the pot file from those
using

prop2po -P

When building the xo bundle, it would then generate translated properties
files using

po2prop -t

It seems like it should work and no real code to write other than the build
bits :)





On 4 June 2013 00:05, Daniel Narvaez  wrote:

> Well, Jed apparently requires converting po to json too, so we won't save
> on the build bits. It probably doesn't solve the problem of extracting
> translatable strings either.
>
>
> On 4 June 2013 00:00, Daniel Narvaez  wrote:
>
>> An alternative could be to combine webL10N and Jed
>>
>> http://slexaxton.github.io/Jed/
>>
>> Either adapt webL10N to use Jed or add the dom bits of webL10N to Jed.
>> The webL10N code is pretty simple, so it might easier then figuring out how
>> to setup the prop2po build bits.
>>
>>
>> On 3 June 2013 23:20, Daniel Narvaez  wrote:
>>
>>> I had a look at the code and I don't see anything firefox specific, I
>>> suspect the full API will work on latest webkit (they try to support really
>>> old browsers and that's probably where they only support a basic API).
>>>
>>> The thing I'm not convinced about is using .properties files. But unless
>>> we can find a library which uses gettext and support translating html...
>>> perhaps we can just use prop2po.
>>>
>>>
>>> On 3 June 2013 22:56, Daniel Narvaez  wrote:
>>>
 Hello,

 we didn't really think about how to support translations of the web
 activities. This is how mozilla is doing it

 https://github.com/fabi1cazenave/webL10n

 It claims to be cross browsers but they have a "modern" API which is
 firefox only. I'm not sure what that exactly mean, but a basic API is
 probably better than having to write our own thing.

 They use ini files, but there are tools to convert to and from po files.


 http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po

 --
 Daniel Narvaez

>>>
>>>
>>>
>>> --
>>> Daniel Narvaez
>>>
>>
>>
>>
>> --
>> Daniel Narvaez
>>
>
>
>
> --
> Daniel Narvaez
>



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


Re: [Sugar-devel] Web activities and i10n

2013-06-03 Thread Daniel Narvaez
Well, Jed apparently requires converting po to json too, so we won't save
on the build bits. It probably doesn't solve the problem of extracting
translatable strings either.


On 4 June 2013 00:00, Daniel Narvaez  wrote:

> An alternative could be to combine webL10N and Jed
>
> http://slexaxton.github.io/Jed/
>
> Either adapt webL10N to use Jed or add the dom bits of webL10N to Jed. The
> webL10N code is pretty simple, so it might easier then figuring out how to
> setup the prop2po build bits.
>
>
> On 3 June 2013 23:20, Daniel Narvaez  wrote:
>
>> I had a look at the code and I don't see anything firefox specific, I
>> suspect the full API will work on latest webkit (they try to support really
>> old browsers and that's probably where they only support a basic API).
>>
>> The thing I'm not convinced about is using .properties files. But unless
>> we can find a library which uses gettext and support translating html...
>> perhaps we can just use prop2po.
>>
>>
>> On 3 June 2013 22:56, Daniel Narvaez  wrote:
>>
>>> Hello,
>>>
>>> we didn't really think about how to support translations of the web
>>> activities. This is how mozilla is doing it
>>>
>>> https://github.com/fabi1cazenave/webL10n
>>>
>>> It claims to be cross browsers but they have a "modern" API which is
>>> firefox only. I'm not sure what that exactly mean, but a basic API is
>>> probably better than having to write our own thing.
>>>
>>> They use ini files, but there are tools to convert to and from po files.
>>>
>>>
>>> http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po
>>>
>>> --
>>> Daniel Narvaez
>>>
>>
>>
>>
>> --
>> Daniel Narvaez
>>
>
>
>
> --
> Daniel Narvaez
>



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


Re: [Sugar-devel] Web activities and i10n

2013-06-03 Thread Daniel Narvaez
An alternative could be to combine webL10N and Jed

http://slexaxton.github.io/Jed/

Either adapt webL10N to use Jed or add the dom bits of webL10N to Jed. The
webL10N code is pretty simple, so it might easier then figuring out how to
setup the prop2po build bits.


On 3 June 2013 23:20, Daniel Narvaez  wrote:

> I had a look at the code and I don't see anything firefox specific, I
> suspect the full API will work on latest webkit (they try to support really
> old browsers and that's probably where they only support a basic API).
>
> The thing I'm not convinced about is using .properties files. But unless
> we can find a library which uses gettext and support translating html...
> perhaps we can just use prop2po.
>
>
> On 3 June 2013 22:56, Daniel Narvaez  wrote:
>
>> Hello,
>>
>> we didn't really think about how to support translations of the web
>> activities. This is how mozilla is doing it
>>
>> https://github.com/fabi1cazenave/webL10n
>>
>> It claims to be cross browsers but they have a "modern" API which is
>> firefox only. I'm not sure what that exactly mean, but a basic API is
>> probably better than having to write our own thing.
>>
>> They use ini files, but there are tools to convert to and from po files.
>>
>>
>> http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po
>>
>> --
>> Daniel Narvaez
>>
>
>
>
> --
> Daniel Narvaez
>



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


Re: [Sugar-devel] Web activities and i10n

2013-06-03 Thread Daniel Narvaez
I had a look at the code and I don't see anything firefox specific, I
suspect the full API will work on latest webkit (they try to support really
old browsers and that's probably where they only support a basic API).

The thing I'm not convinced about is using .properties files. But unless we
can find a library which uses gettext and support translating html...
perhaps we can just use prop2po.


On 3 June 2013 22:56, Daniel Narvaez  wrote:

> Hello,
>
> we didn't really think about how to support translations of the web
> activities. This is how mozilla is doing it
>
> https://github.com/fabi1cazenave/webL10n
>
> It claims to be cross browsers but they have a "modern" API which is
> firefox only. I'm not sure what that exactly mean, but a basic API is
> probably better than having to write our own thing.
>
> They use ini files, but there are tools to convert to and from po files.
>
>
> http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po
>
> --
> Daniel Narvaez
>



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


[Sugar-devel] Web activities and i10n

2013-06-03 Thread Daniel Narvaez
Hello,

we didn't really think about how to support translations of the web
activities. This is how mozilla is doing it

https://github.com/fabi1cazenave/webL10n

It claims to be cross browsers but they have a "modern" API which is
firefox only. I'm not sure what that exactly mean, but a basic API is
probably better than having to write our own thing.

They use ini files, but there are tools to convert to and from po files.

http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html?id=toolkit/prop2po

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