Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to know why is the module name extracted? As I know it should not be translated and the translated version is not displayed anywhere.
info.0 - key "name" in the info file
module.0 - module filename
Comment | File | Size | Author |
---|---|---|---|
#5 | 368197-potx-no-module-machine-name-D6.patch | 843 bytes | Dave Reid |
Comments
Comment #1
Zoltán Balogh CreditAttribution: Zoltán Balogh commented+1 I would like to know too.
Comment #2
Gábor HojtsyIt definitely used to be use before .info files were present (used to be t()-ed in the module listing). The current use or lack of use should be looked into.
Comment #3
Dave ReidI took a look at contributions/translations/drupal-pot/general.pot (DRUPAL-6--1). It appears that the name, description, and package fields are all used in translations. Should this be marked by design?
Comment #4
Gábor HojtsyThis issue is about the module internal name (such as "potx" included in the output), not the .info file name attribute value (such as "Translation template extractor").
Comment #5
Dave ReidWell the original post did mention 'info.0 - key "name" in the info file', but that should be included in the pot files. Attached patch removes the extraction of the module or theme's machine name (e.g. module_name).
Comment #6
Pasquallepotx.module:0 = potx
potx.info:0 = Translation template extractor
none of these should be in the export, as they should not be translated. Where is it displayed as translated in Drupal?
I know some modules (like Advanced help) translates the module name, but that's a bug in the module..
Comment #7
Pasquallecrosspost
Comment #8
Dave ReidIsn't "potx.info:0 = Translation template extractor" translated in admin/build/modules? All the official translations for Drupal core have all the module .info name values translated:
es/general.po:
#: modules/update/update.info:0
msgid "Update status"
msgstr "Estado de actualización"
#: modules/trigger/trigger.info:0
msgid "Trigger"
msgstr "Disparador"
etc...
Comment #9
Pasquallebut not displayed
no, the admin/build/modules page does not translate the module names
Comment #10
Pasquallenote: module name = full English name of the project
Module names are essential parts of the d.o infrastructure (now), like you can filter issues by module name. It will not work with translated names..
Comment #11
Dave ReidI just tried working with Spanish as default language on my local install. Imported all the Spanish translations and saw that module names are not translated ever on admin/build/modules, admin/help, or admin/help/module_name. Interesting.
Comment #12
Pasqualle#152375: Implement translatable module names (with context) it is still undecided, but the current situation is that module names are not translated
Comment #13
Dave ReidGot it. We do agree however that the machine name of the module (e.g. my_module) should not be included in the translation file right? If so, please review patch in #5.
Comment #14
Gábor HojtsyCommitted #5 to Drupal 6.x-2.x, thanks. I am not actually actively maintaining the 5.x branches, but moving down so we have an accurate list of stuff not there yet.
Comment #15
Dave ReidMarked #556754: Don't extract module names as a duplicate of this.
Comment #16
Gábor HojtsySince 5.x is not maintained, moving back to fixed.