Just can't stay away
Joined: 2006/12/1 18:01 Last Login
: Yesterday 23:00
From Copenhagen, Denmark
Group:
Registered Users
|
@several:
What you're discussing now is in fact how to restrict as much as possible Locale's freedom to automatically work for you, i.e. you're working against it rather than benefitting from it.
As explained earlier, yes, you can make sure no older catalogs can be used by increasing the #version in the .cd (and what jabirulo explains above is probably the same, just from within the program code. I have never made a program with localization, so I see it from the translators POV and only know what is in the .cd and .ct files).
If you change that #version, all catalogs must have a version equal to than (note well: not equal or greater, but exactly equal). So if you change the #version from e.g. 1 to 2, a catalog with version 1.17 or 1.43 or 53.11 will not be loaded, only catalogs with 2.x, e.g. 2.1, 2.42, 2.123 etc. will work.
But if you want to use this to make sure nobody ever uses an obsolete catalog, you will have to increase the #version for each and every new release.
It was never meant for that. It is a mechanism you should use when you at one point absolutely need to restructure your .cd file and simply cannot keep the normal backwards compatibility any more. In the typical project, it will maybe happen once over the entire lifetime of the project.
The intention of the system is to make it possible to use older catalogs as much as possible, letting Locale fall back to secondary user-preferred languages or finally to English when encountering strings not present in the .catalog.
This has worked fine and makes the whole translation work pretty relaxed, as all the translators can provide their revisions when they have time, and in the meantime no big problem is seen by the users, only an occasional English string. But of course only if the IDs are not shifted.
Again, you can choose to work against these intentions, but now I have explained them (to the best of my knowledge).
Best regards,
Niels
|