L20n:Mobile First

From MozillaWiki
Jump to: navigation, search

The native Java UI for Fennec might be a good opportunity to do l20n "mobile first".

Setting

Native Java on Android comes with a existing localization infrastructure. That does feel a bit awkward, though. Just to tip the iceberg, using \' to escape quotes in xml files doesn't stand for great design. Quite generally, the native android infrastructure can be tied to what we do in Mozilla, but it's a step backwards.

L20n would also be different, but it's a step forward.

Why is native Java a good candidate for l20n?

On java, there's a rather well-structured parser infrastructure, ANTLR. That's icky to use for gecko, as it doesn't come with a maintained javascript backend, and it also might require java. But for the android-native build environment, that's not an isse. Also, Fennec is a simple UI with a (now) small set of localizations, so changing here first is a good idea.

Why is it not good?

The native UI is very much in flux and under pressure, and adding another variable to it doesn't help.

Plan

Getting l20n into java calls shouldn't be the biggest hurdle. The real obstacle are the XML layout file that android apps come with. So we need to:

  • figure out how the current infrastructure works
  • see how we can tweak it
  • show that we're good perf-wise

Resourcing

We have an opportunity to resource this project independent of our own engineering resources, and we should be able to create a small and short project to prove the feasibility of this.

Make a simple version of l20n, and call it from both real java and XML layout files, for a handful of locales.

Current Findings

The android docs talk quite a bit of how the source looks, but there's a bit of a mystery of what the generated code does. We're keeping track of our findings on L10n:Native Android.