ISSUE-80: Runtime localization model for widgets

Runtime localization model for widgets

State:
CLOSED
Product:
HISTORICAL: Widgets [Bugs and Issues are tracked via Bugzilla https://www.w3.org/Bugs/Public/describecomponents.cgi?product=WebAppsWG]
Raised by:
Josh Soref
Opened on:
2009-02-02
Description:
Below is a discussion I had with Josh about the localization model for
widgets. Josh identifies an issue that may affect localization at
runtime that may be overcome by having the widget engines dynamically
change folders when it can't find resources.

timeless.bmo1@gmail.com: how do localized folders work anyway?
Sent at 12:01 AM on Sunday
timeless.bmo1@gmail.com: oh, it's hidden in <base folder>
me: you put folders that follow the "lang-place" pattern into a
folder called "locale". The UA looks for a folder that matches the
user's locale prefs
timeless.bmo1@gmail.com: i'm not quite sure i understand or like that
imagine i have 100 images
and only want to localize 2
if base-folder means that i have to copy the whole set, i'm unhappy
me: no, just make all your refs absolute. it's no problem
timeless.bmo1@gmail.com: no, definitely bad
that means i have to know in advance if i need to localize a path
instead of just having 1 locale that needs to localize a file
me: yes. But it supports multiple models of localization. So the
model is quite flexible.
timeless.bmo1@gmail.com: supporting a virtual mapping would have
been better :(
me: we can always change it if you have a better proposal
timeless.bmo1@gmail.com: i guess the simplest question is would you
ever have a localized file foo.bar and want access to the original
unlocalized file
timeless.bmo1@gmail.com: i claim no
me: no, you wouldn't
the idea is that you only localize what you want.
timeless.bmo1@gmail.com: yeah
so, in my model, instead of 'base folder'
a localized file i18n/en-GB/index.html appears as /index.html if the
UA selects en-GB
me: I'm sure we are thinking of the same thing here, but now I'm
worried I've done this wrong.
timeless.bmo1@gmail.com: (so searches go first to i18n/en-GB/ and then to /)
if index.html has <img src="flag.png">
me: flag.png gets resolved to i18n/en-GB/flag.png
timeless.bmo1@gmail.com: then whether it's /index.html, or
/i18n/fr-FR/index.html if the UA locale is fr-FR, it first looks in
/i18n/fr-FR/flag.png and then /flag.png
yeah, but that's not what i want
it's a disaster
me: no, it only goes to one location
timeless.bmo1@gmail.com: yeah, that sucks.
you end up w/ millions of included files in dozens of locales
because only one needed an override
or you have to fork each html file just to make something happy
me: hmmm
I'm not convinced... I thought I had sorted this out
I need to do some tests
timeless.bmo1@gmail.com: we have a VFS, and our UA has a cache,
which means having it try two paths won't hurt
(and it's a readonly VFS, so if i do <img src="images/flag.png"> and
my locale doesn't have /i18n/fr-FR/images/, then the UA can skip the
check for the file there and go straight to /images/flag.png
Sent at 12:12 AM on Sunday
timeless.bmo1@gmail.com: basically, when people try to localize,
they often end up forking html files. and often they create stale
versions w/o noticing
me: I kinda get where you are going, but it seems like the behavior
is kinda unpredictable. I'm kinda seeing the problem now.
timeless.bmo1@gmail.com: it's fairly easy to make a tool to show
which version of a file would be used
me: does it matter that you dont need to have a html file in the
localized folders?
that way you only need to branch when you need a special layout
timeless.bmo1@gmail.com: if all i have is /index.html and it has
<img src="flag.png"> then it should search /i18n/fr-FR/flag.png then
/flag.png
having to branch html files is dangerous
me: ah!
/me gets it now :)
timeless.bmo1@gmail.com: note that i switched from en-GB to fr-FR as my locale
:)
me: ok, that should be easy to specify.
it's just a minor extension to what we already have
kinda fallback behavior
Related Actions Items:
No related actions
Related emails:
  1. [widgets] Draft Agenda for 7 May 2009 Voice Conference (from art.barstow@nokia.com on 2009-05-06)
  2. Re: [widgets] Agenda for 5 March 2009 Voice Conference (from marcosc@opera.com on 2009-03-06)
  3. Re: [widgets] Minutes from 5 March 2009 Voice Conference (from frederick.hirsch@nokia.com on 2009-03-05)
  4. [widgets] Minutes from 5 March 2009 Voice Conference (from art.barstow@nokia.com on 2009-03-05)
  5. RE: [widgets] Agenda for 5 March 2009 Voice Conference (from BS3131@att.com on 2009-03-05)
  6. [widgets] Agenda for 5 March 2009 Voice Conference (from art.barstow@nokia.com on 2009-03-04)
  7. [widgets] Minutes from 24 February 2009 Widgets F2F Meeting (from art.barstow@nokia.com on 2009-02-26)
  8. Re: ISSUE-80: Runtime localization model for widgets [Widgets] (from marcosc@opera.com on 2009-02-23)
  9. Re: ISSUE-80: Runtime localization model for widgets [Widgets] (from timeless@gmail.com on 2009-02-18)
  10. Re: ISSUE-80: Runtime localization model for widgets [Widgets] (from Jere.Kapyaho@nokia.com on 2009-02-17)
  11. RE: ISSUE-80: Runtime localization model for widgets [Widgets] (from Mark.Priestley@vodafone.com on 2009-02-17)
  12. Re: ISSUE-80: Runtime localization model for widgets [Widgets] (from marcosscaceres@gmail.com on 2009-02-13)
  13. RE: ISSUE-80: Runtime localization model for widgets [Widgets] (from Mark.Priestley@vodafone.com on 2009-02-06)
  14. Re: ISSUE-80: Runtime localization model for widgets [Widgets] (from jferrai@us.ibm.com on 2009-02-04)
  15. ISSUE-80: Runtime localization model for widgets [Widgets] (from sysbot+tracker@w3.org on 2009-02-02)

Related notes:

On 7-May-2009 the WG resolved this Issue is closed. See: http://www.w3.org/2009/05/07-wam-minutes.html#item07

Arthur Barstow, 7 May 2009, 15:55:38

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 80.html,v 1.1 2016/01/25 10:26:23 carine Exp $