After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 94611 - schemas support fixups/changes
schemas support fixups/changes
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other other
: Normal normal
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks:
 
 
Reported: 2002-10-01 16:44 UTC by Yanko Kaneti
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (3.79 KB, patch)
2002-10-01 16:45 UTC, Yanko Kaneti
none Details | Review

Description Yanko Kaneti 2002-10-01 16:44:28 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.
Comment 1 Yanko Kaneti 2002-10-01 16:45:23 UTC
Created attachment 11340 [details] [review]
proposed patch
Comment 2 Havoc Pennington 2002-10-01 18:11:07 UTC
Yes, #1 is correct - only a very few defaults need localization, so
normally they aren't localized.
Comment 3 Yanko Kaneti 2002-10-01 19:12:15 UTC
Ugh , I screwed up the assignment , sorry
Comment 4 Kenneth Rohde Christiansen 2002-10-02 15:05:07 UTC
Nautilus uses [ and ] for descriptions. Ie. the string "[search after
]address" will be shown as "address". Maybe we should use the same syntax.
Comment 5 Kenneth Rohde Christiansen 2002-10-02 15:08:00 UTC
Patch looks good. You can commit it, but I would like you to accompany
it with a test case.
Comment 6 Yanko Kaneti 2002-10-03 14:18:17 UTC
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.