GNOME Bugzilla – Bug 94611
schemas support fixups/changes
Last modified: 2004-12-22 21:47:04 UTC
Here is a patch that addresses some things about the schemas support: 1.Currently the extraction picks up every <default> elements content even the ones outside the <locale..... I think it should distinguish the defaults needed to be locallized by just picking the ones which are in the <local name="C"> block. 2.The merging part currently works only for <locale.. blocks with a full structure having all of default,short and long. This for obvious reason doesnt work for many of the currently deployed schemas which only have short and long. 3. There is no strictly defined way to provide different translations for defaults having the same value but needing different localisation depending on the key they apply to. I propose to introduce an addition to the default elemnt content which will uniquely identify the particular values. For example in clocks.schemas.in to be merged with trnsalations... <default>@/schemas/apps/clock_applet/prefs/hour_format@12</default> upon extraction this will be included in the pot file as "@/schemas/apps/clock_applet/prefs/hour_format@12" the translator needs to translate this ot "12" upon merging the "C" default values are sttripped from the @.*?@ and the other locales get their respective translation depending on its availability the text between the @ can be arbitrary given that it uniquely identifies the default I think this will mostly work and not create a very big burden for the translators because in reality very few default values need to be localized. Havoc: Kenneth wanted me to confirm with you that my idea in point 1 describes the intent of the different defaults position in the schemas. Not sure how optimal the @.*?@ solution is but I couldnt think of anything better.
Created attachment 11340 [details] [review] proposed patch
Yes, #1 is correct - only a very few defaults need localization, so normally they aren't localized.
Ugh , I screwed up the assignment , sorry
Nautilus uses [ and ] for descriptions. Ie. the string "[search after ]address" will be shown as "address". Maybe we should use the same syntax.
Patch looks good. You can commit it, but I would like you to accompany it with a test case.
Ok I've comitted along with a testcases on make check, also changed the marker sting to be enclosed with "[" , "]" as you suggested. (I think i like @ better but I cant se a big difference atm) hope I havent dome something completely dumb, please test if you can 2002-10-02 Yanko Kaneti <yaneti@declera.com> * intltool-extract.in.in * intltool-merge.in.in: gconf schemas handling changes as described in bug #94611. * tests/selftest.pl.in * tests/cases/Makefile.am * tests/results/Makefile.am * tests/cases/schemasmerge1.po (added) * tests/cases/schemasmerge2.po (added) * tests/cases/test.schemas.in (added) * tests/results/test.schemas (added) * tests/results/test.schemas.in.h (added): 2 tests for the above.