Ubiquity localization update + open questions

0 views
Skip to first unread message

"mitcho (Michael 芳貴 Erlewine)"

unread,
Jun 12, 2009, 6:54:42 AM6/12/09
to ubiqui...@googlegroups.com
Hi all,

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

Toni Hermoso Pulido

unread,
Jun 12, 2009, 7:33:28 AM6/12/09
to ubiqui...@googlegroups.com
Hi Mitcho,

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>:

"mitcho (Michael 芳貴 Erlewine)"

unread,
Jun 12, 2009, 7:53:37 AM6/12/09
to ubiqui...@googlegroups.com, ubiqui...@googlegroups.com
Yes yes, you can just separate them by the pipe, |.

suprimeix|elimina

mitcho (Michael Yoshitaka Erlewine)

On Jun 12, 2009, at 8:33 PM, Toni Hermoso Pulido <ton...@gmail.com>
wrote:

satyr

unread,
Jun 12, 2009, 3:13:37 PM6/12/09
to ubiqui...@googlegroups.com
Not sure how this would handle the { author: {name: "who", email: ...}
} format. (Do we really need to localize author(s)/contributor(s) in
the first place?).

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>

Blair McBride

unread,
Jun 12, 2009, 5:50:16 PM6/12/09
to ubiqui...@googlegroups.com
No.

"mitcho (Michael 芳貴 Erlewine)"

unread,
Jun 12, 2009, 10:02:49 PM6/12/09
to ubiqui...@googlegroups.com
> Not sure how this would handle the { author: {name: "who", email: ...}
> } format. (Do we really need to localize author(s)/contributor(s) in
> the first place?).

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

satyr

unread,
Jun 12, 2009, 10:26:01 PM6/12/09
to ubiqui...@googlegroups.com
On Sat, Jun 13, 2009 at 11:02 AM, "mitcho (Michael 芳貴
Erlewine)"<mit...@mitcho.com> wrote:
> Actually the idea is that only the localizable properties (names,
> contributors, help) would actually get placed into the commands...

Why the limitations?

"mitcho (Michael 芳貴 Erlewine)"

unread,
Jun 12, 2009, 10:29:44 PM6/12/09
to ubiqui...@googlegroups.com
I don't think we should add arbitrary properties to the verbs. If we
did, we would at least need some namespacing.

If we can just wrap strings in _(), that would be very easy for
command authors to adopt. Besides, if we use "this.helloMessage", for
example, 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.

m
--
mitcho (Michael 芳貴 Erlewine)
mit...@mitcho.com

satyr

unread,
Jun 12, 2009, 10:42:03 PM6/12/09
to ubiqui...@googlegroups.com
On Sat, Jun 13, 2009 at 11:29 AM, "mitcho (Michael 芳貴
Erlewine)"<mit...@mitcho.com> wrote:
> I don't think we should add arbitrary properties to the verbs. If we
> did, we would at least need some namespacing.

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?

"mitcho (Michael 芳貴 Erlewine)"

unread,
Jun 12, 2009, 10:58:46 PM6/12/09
to ubiqui...@googlegroups.com
> 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 McBride

unread,
Jun 14, 2009, 11:27:01 PM6/14/09
to ubiqui...@googlegroups.com
This makes me wonder if we should have special metadata specifically for
localizers. It wasn't something I considered when I wrote up the old
metadata specs.

- Blair

Blair McBride

unread,
Jun 14, 2009, 11:28:14 PM6/14/09
to ubiqui...@googlegroups.com
Agreed.

Blair McBride

unread,
Jun 14, 2009, 11:28:50 PM6/14/09
to ubiqui...@googlegroups.com
Huh?
Reply all
Reply to author
Forward
0 new messages