Opened 13 months ago
Closed 7 weeks ago
#198 closed enhancement (duplicate)
Option to get correct file name
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | |
| Keywords: | Cc: | defries, dimadin |
Description
Currently, when exporting "all current" strings from a project, the file name uses the GlotPress to the project (or so it seems): exporting strings from /projects/wp/dev/de/default results in wp-dev-de.po and so on.
The issue is that it's not the correct name for use with the target tools. In this case, the name should be de_DE.po, just as exporting from /projects/wp/dev/admin/pt-br/default should give admin-fr_FR.po and not wp-dev-admin-pt-br.po.
I think there should at least be an option for the GlotPress admin to set the final file name, and for the translator to choose which versions s/he wants.
Change History (7)
- Keywords 2nd-opinion added
- Owner changed from somebody to nbachiyski
- Status changed from new to assigned
It is a question of standardization of the po, not personal taste. For example, the correct nomenclature for files in Brazilian portuguese is pt_BR, Portuguese of Portugal is pt_PT. the same happens with other languages.
In GNU.org:
Language
Fill in the language code of the language. This can be in one of three forms:
‘ll’, an ISO 639 two-letter language code (lowercase). See Language Codes for the list of codes.
‘ll_CC’, where ‘ll’ is an ISO 639 two-letter language code (lowercase) and ‘CC’ is an ISO 3166 two-letter country code (uppercase). The country code specification is not redundant: Some languages have dialects in different countries. For example, ‘de_AT’ is used for Austria, and ‘pt_BR’ for Brazil. The country code serves to distinguish the dialects. See Language Codes and Country Codes for the lists of codes.
‘ll_CC@variant’, where ‘ll’ is an ISO 639 two-letter language code (lowercase), ‘CC’ is an ISO 3166 two-letter country code (uppercase), and ‘variant’ is a variant designator. The variant designator (lowercase) can be a script designator, such as ‘latin’ or ‘cyrillic’.
The naming convention ‘ll_CC’ is also the way locales are named on systems based on GNU libc. But there are three important differences:
In this PO file field, but not in locale names, ‘ll_CC’ combinations denoting a language's main dialect are abbreviated as ‘ll’. For example, ‘de’ is equivalent to ‘de_DE’ (German as spoken in Germany), and ‘pt’ to ‘pt_PT’ (Portuguese as spoken in Portugal) in this context.
In this PO file field, suffixes like ‘.encoding’ are not used.
In this PO file field, variant designators that are not relevant to message translation, such as ‘@euro’, are not used.
So, if your locale name is ‘de_DE.UTF-8’, the language specification in PO files is just ‘de’.
comment:6
markoheijnen — 7 weeks ago
- Keywords 2nd-opinion removed
- Milestone 1.0 deleted
Closing this one in favor of #206.
comment:7
markoheijnen — 7 weeks ago
- Resolution set to duplicate
- Status changed from assigned to closed

I absolutely agree. Being able to set to the name of the export file is a must. Especially when doing bulk export sessions.