Re: Style and Template Localizations

From: Ryan Pavlik <abiryan_at_ryand.net>
Date: Sat May 31 2008 - 23:31:56 CEST

Ryan Pavlik wrote:
> Howdy all!
>
> Right now, the name that users see for styles is the same as the
> internal identifier we use for that style. This has several effects,
> one of which is that we can't easily localize style names, even the
> standard ones. I propose the following improvement, as a part of my
> Summer of Code work: (See bug [1])
>
> Add an additional property called "label" to styles, so that we'd have
> <style name="..." label="..."
> - This requires that we keep the Name something human-readable so that
> files are backward-compatible. User-created styles would default to
> having Name==Label.
> - When loading a document with just "name" there, we default label to
> be the same.
>
> Upon loading/displaying document (not sure where exactly), we would use
> the locale-specific normal.awt file to find the label to use for the
> default style names. This means that if a document only used default
> styles, every user would see those style labels in their own language
> while being able to share documents across locales. The currently
> in-use style label would probably be the one saved out to be used if no
> locale-specific awt is available.
> Options: For stock styles always save the English/canonical label, or
> the label that was loaded from the file: either solution prevents
> unnecessary document changes, which might be important if someone is
> using a VCS to store documents (cleaner diffs).
>
>
> A vaguely-related concern is that of template localization. Right now,
> we have just a few templates, and all in English. There is a bug with
> translations of those templates into Dutch, but as we don't have a
> mechanism for handling template translation, they're not being used.
> [2] Templates vaguely fall into my SoC work as well, so it would be
> nice to find a solution here too. The 'simple solution', as least as it
> appears to me, is to have translated files stored as .awt-nl_NL for
> instance, and then if a template for the user's locale is available, use
> it instead of the .awt one, which would serve as the en_US template for
> shipping templates and a fallback. User-saved templates would still be
> called .awt, or perhaps .awt-currentlocale - not sure about this part.
> Ideally, I'd make a new dialog for the "New from Template" allowing a
> bit more useful display and perhaps the selection of a template that is
> not matching the user's default locale as a special option.
>
> Anyway, posting this to request feedback before I start coding these
> bits. If you have comments, concerns, better ideas, or hints on
> where/how to get started efficiently, please do not hesitate to reply :)
>
> Ryan
>
>
> [1] http://bugzilla.abisource.com/show_bug.cgi?id=9929
> [2] http://bugzilla.abisource.com/show_bug.cgi?id=7928
>
>
Given that I haven't heard any feedback, I'll assume this plan is at
least reasonably reasonable, and will proceed with it. If there are
concerns or comments, please feel free to interject them at any time.

Ryan

-- 
Ryan Pavlik
www.cleardefinition.com
#282  +  (442) -  [X]
A programmer started to cuss
Because getting to sleep was a fuss
As he lay there in bed
Looping 'round in his head
was: while(!asleep()) sheep++;
Received on Sat May 31 23:32:11 2008

This archive was generated by hypermail 2.1.8 : Sat May 31 2008 - 23:32:11 CEST