Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: Localization

Expand Messages
  • Satyam
    It wasn t slow at all. My only concern was that the localization was not something that can be done at the Widget level without support from the foundation and
    Message 1 of 6 , May 28, 2009
    • 0 Attachment
      It wasn't slow at all.

      My only concern was that the localization was not something that can be
      done at the Widget level without support from the foundation and since
      that part is being finished, I wouldn't like to see either 3.1
      localization constrained by shortcomings on the foundation nor parts of
      the foundation redefined to suit the needs of the widget. And, mostly,
      it is not even an issue of code but of support on the build process, the
      CDN, the directory structure (should it be /build/assets/locale or
      /build/locale for the texts, and then /build/assets/en/skins/sam or
      /build/assets/skins/en/sam for the icons or should it be en-US ......).
      Can't work it all from the client side.

      Anyway, if I know you guys know, I'm fine.

      Thanks

      Satyam


      Eric Miraglia escribió:
      >
      >
      > Satyam,
      >
      > Sorry to be slow in responding to this thread.
      >
      > You kicked this off with a message that describes the complexity of
      > the localization challenge, and you're right that YUI 3.0.0 beta 1
      > doesn't yet address that complexity. While we've released a draft of
      > the widget framework, we haven't yet included full support for
      > localization. You can expect to see that support in 3.1.0, the first
      > major release after the foundation of the library reaches GA in 3.0.0.
      >
      > 3.1.0 will be the first GA release of the widget framework. That
      > framework will accommodate all of the issues you've raised, including
      > localization of keyboard shortcuts.
      >
      > Don't take the current localization support in PR2 or beta 1 as our
      > complete thinking on this -- we know there's a lot of work to do on
      > that front, and we'll be doing that work in the 3.1.0 cycle as we
      > complete the widget framework.
      >
      > -Eric
      >
      >
      > On May 27, 2009, at 12:22 AM, Satyam wrote:
      >
      >> Version 3 does have some localization features, the issue goes further
      >> down and it is not just having an extra module but also of server-side
      >> infrastructure such as, will there be a repository for translations of
      >> YUI components? Will the CDN allow for loading the translation files?
      >> My whole point is that just adding a module or a few methods here and
      >> there doesn't really work
      >>
      >> Satyam
      >>
      >> lou_tribal escribió:
      >> > By a curious coincidence I am on the point to release a
      >> localization module I made under BSD license.
      >> > This module has been made for 2.7 but if you like the way it is
      >> working and the idea behind it I guess it will be easy to port it to 3.0.
      >> > I will make it available with its documentation and example in few
      >> days at most, I will post a link here.
      >> > Feel free to comment on that and to tell me if you find it
      >> interesting or not.
      >> >
      >> > <
      >> >
      >> > --- In ydn-javascript@yahoogroups.com
      >> <mailto:ydn-javascript%40yahoogroups.com>, Satyam <satyam@...> wrote:
      >> >
      >> >> While listening to Todd Kloots presentation about accessibility I
      >> >> suddenly realized it didn't make any sense to me.
      >> >>
      >> >> Just look at these stats, inaccurate as they might be:
      >> >>
      >> >>
      >> http://en.wikipedia.org/wiki/List_of_languages_by_number_of_speakers
      >> <http://en.wikipedia.org/wiki/List_of_languages_by_number_of_speakers>
      >> >>
      >> >> Todd says "So we used YUI 3 as an opportunity to really take a fresh
      >> >> look at the library, develop both a common widget architecture,
      >> but also
      >> >> take accessibility into consideration from the very, very
      >> beginning, and
      >> >> build it into the foundation of our widget library."
      >> >>
      >> >> YUI has no built-in accessibility features to fully able non-English
      >> >> speakers, and that is a lot of people!
      >> >>
      >> >> A beta of YUI 3 will be released at any time and the only support for
      >> >> localization it has is allowing for alternate sets of strings to be
      >> >> loaded which, by the way, doesn't work all that well.
      >> >>
      >> >> But this is just a little part of all that implies localizing a
      >> >> library. Take, for example just a couple of buttons on the toolbar of
      >> >> the Rich Text Editor.
      >> >>
      >> >> B for "Boldface", accessible via Ctrl-B. In Spanish "boldface" is
      >> >> "Negrita" and the shortcut should be Ctrl-N (that's how it is in most
      >> >> word processors)
      >> >> Left align, accessible via Ctrl-[. You would think that, with a
      >> purely
      >> >> graphical icon and shortcut, there should be no problem. Well,
      >> indeed,
      >> >> there is. The [ key us not really handy in most keyboards but
      >> English.
      >> >> For example, in the French keyboard:
      >> >>
      >> >> http://en.wikipedia.org/wiki/File:French_pc_keyboard.svg
      >> <http://en.wikipedia.org/wiki/File:French_pc_keyboard.svg>
      >> >>
      >> >> You have to use the "Alt Gr" key (to the right of the space bar)
      >> and the
      >> >> number 5 to produce it. All those keys that have three symbols on
      >> them
      >> >> (or the E which implicitly has lower and upper case e plus the Euro
      >> >> sign) need the "Alt Gr" modifier to produce the third symbol on them.
      >> >> This "Alt Gr" key does not work along the Ctrl key so in my Spanish
      >> >> keyboard I have no means of producing a Ctrl [ nor any other Ctrl
      >> >> combination with any of the 'third' symbols on the keyboard.
      >> >>
      >> >> So, these two little buttons show us a couple of things that cannot
      >> >> simply resolved by string substitution:
      >> >> - the toolbar icons reside in a sprite and they are defined in a CSS
      >> >> file as background images.
      >> >> - keycodes, which both YUI2 KeyListener and YUI 3 expect as keycode
      >> >> integers, the YUI3 version further complicated because the same
      >> string
      >> >> (yes, it is a string so in principle it could be moved to the
      >> >> localizable strings) encodes several bits of information. Look at the
      >> >> example on the documentation:
      >> >>
      >> >> "So, the following specification will fire only if keyCode 65 or
      >> 66 is
      >> >> detected during a keypress event while shift and control are held
      >> down:
      >> >> 'press:65,66+shift+ctrl'"
      >> >>
      >> >> Now, try to pass that by the translator along all the rest of the
      >> >> localizable strings and expect that to come out right! The previous
      >> >> example of Ctrl-B for boldface would be "press:66+shift" in
      >> English and
      >> >> it should be "press:78+shift" in Spanish but the translator would
      >> likely
      >> >> produce something like "presione:66+mayús", and that is assuming
      >> he is
      >> >> smart enough to realize that "shift" refers to the Shift key and
      >> would
      >> >> use the standard abbreviation.
      >> >>
      >> >> So, localization is not something that can be delayed until we start
      >> >> having widgets. The basic infrastructure for localization is not in
      >> >> place and there seems to be no clear direction in this.
      >> >>
      >> >> All this must be further supported by a platform that allows
      >> specifying
      >> >> the locale and loading the corresponding resources. I'm happy to see
      >> >> that the most current versions of the YUI object has added other
      >> >> configuration attributes, such as locale, dateFormat though it is
      >> >> missing numberFormat and currencyFormat and, anyway, it doesn't do
      >> much
      >> >> with them except storing them and defaulting to English. If the
      >> >> translation files are not there, nor is there any plans on where they
      >> >> should go or how to have them loaded, that locale setting will
      >> help very
      >> >> little.
      >> >>
      >> >> The directory structure for the library should support different
      >> locales
      >> >> so the loader could, at least in the future, be able to load
      >> localized
      >> >> files, which should include image sprites! A similar directory
      >> >> structure should be planned for the Git repository so as to allow
      >> >> external contributors to volunteer localized texts and icons and the
      >> >> later to be assembled into sprites by the built process.
      >> >>
      >> >> Thanks for the patience
      >> >>
      >> >> Satyam
      >> >>
      >> >> (who first raised this issue privately several months ago and in all
      >> >> occasions it faded away)
      >> >>
      >> >>
      >> >
      >> >
      >> >
      >> >
      >> > ------------------------------------
      >> >
      >> > Yahoo! Groups Links
      >> >
      >> >
      >> >
      >> > ----------------------------------------------------------
      >> >
      >> >
      >> > No virus found in this incoming message.
      >> > Checked by AVG - www.avg.com <http://www.avg.com>
      >> > Version: 8.5.339 / Virus Database: 270.12.39/2134 - Release Date:
      >> 05/25/09 18:14:00
      >> >
      >> >
      >>
      >
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.339 / Virus Database: 270.12.42/2137 - Release Date: 05/27/09 07:50:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.