I'm not sure this is the right module for this request, but I dont see a better one.
This module allows us to extract and export translation templates on a per-module basis. What I suggest here is that we can also create translation templates for a module and a certain language with the translated string being filled with data from the site's locale db. That would make it much easier for developers to update their translation templates and module translations after some strings were modified.
Say you have a module ABC and you have it translated to German (de) and Italian (it) language. Your development site has locale module enabled (with the two languages added) and the localized string are imported to your db. You now change some titles, descriptions (or any strings) in your module. Wouldnt it be great if you could use the 'manage strings' feature to change the localized strings as well. You could verify your translated interface working correctly (as you have the appropriate setup) and then you would choose to export
1. a translation template (.pot) and (possible already)
2. a complete translation (.po) for de and it
Comments
Comment #1
gábor hojtsyWe are working on a localization server, which will allow translation communities to work together on translations. Potx module had a translation export functionality as you describe before and there are still remainings of it in the code (although commented out). We removed it until we have time to revisit and fix it's problems because there were some flaws in the original design. Your idea is workable, and we are looking into how we can support translation teams better, going into many directions with Drupal 5 extensions and Drupal 6 built-in functionality.
Comment #2
gábor hojtsyRaimund Bauer implemented this with two plural forms in mind, so it was not ready for language with one or more then two plural forms. The issue was with the code added around here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/potx/potx.i...
The plural generation code could look up the number of plurals required in the language and then look up those with source strings as:
- 1: singular form
- 2: plural form
- 3: plural form with @count replaced with @count[2] (but remove the index in the output)
- 4: plural form with @count replaced with @count[3] (but remove the index in the output)
- ...
This seems like feasible stuff to do, so implementing language exports might not be that far :)
Comment #3
gábor hojtsyAlso, instead of using locale(), we should use our own SQL queries because locale() is only ready for one language in one request (in Drupal 5), so we would poison it's internal cache with lookups in a different language. (Not to mention how messy it is to switch global variables around).
Comment #4
gábor hojtsyOK, just committed the latest potx module which has support for this feature.
Comment #5
(not verified) commented