This is mostly correct.  generated_resources.grd is not generated from
another file.  It is the source file that we manually edit to add
strings.  The step that's missing is that we send generated_resources.grd
to our translators and they provide us with the localized xtb files (some
amount of hand waving here).  So yes, the xtb files are generated outside
the visual studio solution.

If you're adding a feature to chromium to be included in the official
build, you don't have to worry about providing translations other than
English in generated_resources.grd.  We'll handle the translation to all
other languages.

If you just want this feature for your own build of chromium, you should
be able to manually edit the xtb file to create the translation.  The
traslationid is just a md5 hash of the string (see
/src/tools/grit/external/FP.py).

HTH,
tony

On Fri, 19 Sep 2008, Wei Hu wrote:

> I was going to add a new menu item in the context menu, and would like
> to be able to display localized strings instead of a fixed string. In
> particular, I'm going to support both en-US and zh-CN.
> 
> The steps to add a resource string seem to be:
> 
> 1. Add an XML stanza in chrome\app\generated_resources.grd.
> The message string can be fixed or parameterized with $1, $2, etc.
> Changes in generated_resources.grd will be reflected in
> generated_resources.h and generated_resources_en-US.rc.
> 
> 2. Add the translation of the string in every locale, e.g.,
> generated_resources_zh-CN.xtb
> If we don't perform this step, generated_resources_zh-CN.rc gets the
> untranslated string.
> 
> 3. When you need to display the string, call l10n_util::GetString()
> for fixed strings,
> or GetStringF() for parameterized strings.
> 
> The problem is, generated_resources.grd and generated_resources_zh-
> CN.xtb also seem to be generated from other files. But I couldn't find
> the sources of these files. Did Google not release them in the SVN
> repository, or did I miss something? Manually editing the files didn't
> achieve what I wanted.
> > 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to