I just put up a blog post laying out the Ubiquity localization game
plans for the near future, as well as two open problems: what file
format we should use and what kind of key format we should use.
http://mitcho.com/blog/projects/ubiquity-localization-update/
I'd love to get some feedback and comments on these directions and
questions. :)
mitcho
--
mitcho (Michael 芳貴 Erlewine)
mit...@mitcho.com
http://mitcho.com/
linguist, coder, teacher
with this approach, do you think using synonyms for commands (even in
English) would be possible?
For instance:
'delete' in Catalan can be translated as 'suprimeix' or 'elimina', and
being able to use both could be nice.
Cheers,
2009/6/12 "mitcho (Michael 芳貴 Erlewine)" <mit...@mitcho.com>:
On Fri, Jun 12, 2009 at 7:54 PM, "mitcho (Michael 芳貴 Erlewine)"
<mit...@mitcho.com> wrote:
> what kind of key format we should use.
Since commands can refer to itself from within execute/preview,
technically we don't need the _() at all.
...
name: "hello",
execute: function(){
displayMessage(this.hello, this);
},
where: "world!",
...
hello.name=こんちは
hello.where=世界
But sharing these props among commands can be tricky, so it makes
sense to use _() as a feed-global tool.
const Tmpl = _.tmpl("" + <div>
<!-- some large html -->
</div>);
...
preview: function(pbl){
...
pbl.innerHTML = CmdUtils.renderTemplate(Tmpl, {...});
},
...
_tmpl=<div><!-- 大きめのHTML --></div>
I currently have contributors localizable, in case a localizer wants
to add their name.
> On Fri, Jun 12, 2009 at 7:54 PM, "mitcho (Michael 芳貴 Erlewine)"
> <mit...@mitcho.com> wrote:
>> what kind of key format we should use.
>
> Since commands can refer to itself from within execute/preview,
> technically we don't need the _() at all.
>
> ...
> name: "hello",
> execute: function(){
> displayMessage(this.hello, this);
> },
> where: "world!",
> ...
>
> hello.name=こんちは
> hello.where=世界
Actually the idea is that only the localizable properties (names,
contributors, help) would actually get placed into the commands... the
other preview and execute ones don't actually get interpolated into
the command objects, even though the "hello.preview.key" key format
may make it look like that. Thus we would still need a way to access
those strings, thus _(). I hope that makes sense.
--
mitcho (Michael 芳貴 Erlewine)
mit...@mitcho.com
Why the limitations?
Yes. Can use a simple prefix.
> and define helloMessage in the verb, how would Ubiquity know
> that that is a localizable string and not some other custom property
> used in the verb? We wouldn't be able to generate localization
> templates that way.
Means that the author doesn't want to localize it at all, I guess.
How are you planning to generate template for _()s?
Ah, good question. If you have a good suggestion, I'd welcome it.
Parsing the methods .toString is one option... running the methods in
a sandbox with dummy data is another... neither is perfect, though.
--
mitcho (Michael 芳貴 Erlewine)
mit...@mitcho.com
- Blair