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 cannot import the views-6.x-3.2.de.po with l10_update and also not manually. It always fails with syntax error in line 4798.
Can you refresh/fix this corrupted file, please?
Comments
Comment #1
Gábor HojtsyWhat is on that line?
Comment #2
hass CreditAttribution: hass commentedSee http://ftp.drupal.org/files/translations/6.x/views/views-6.x-3.2.de.po
Other +15 follow up lines with
msgctxt
are also causing this issue, too.Comment #3
Gábor HojtsyI don't see a syntax error with that line per say, neither think that regenerating the file will solve anything. Can you give more context from the surrounding lines?
Comment #4
hass CreditAttribution: hass commentedCan you download the linked file and take a look, please?
This issue is always reproducible. What is causing the issue is not clear to me.
Comment #5
Gábor HojtsyThere is nothing wrong with the file. Drupal 6's translation system does not support text context. See https://api.drupal.org/api/drupal/includes%21common.inc/function/t/6 So the Drupal 6 localization update does not support it in .po files either. Theoretically there cannot be Drupal 6 modules that somehow assign context to strings. The problem in views 6.x then to include those strings somehow, secondary in potx to extract them with context from Drupal 6 even though that should not happen and the tertiary in localization update that it does not ignore the msgctxt (unsupported) modifier in .po.
Comment #6
hass CreditAttribution: hass commentedThat means the localization server packaging has a bug as it exported the D6 po files with context. How can we fix this now?
Comment #7
Gábor HojtsyIts not the packaging. If somehow strings with context end up in the database it means that the same string may appear twice for the release (with and without context). So we cannot fix that on export. How are we to choose which translation to pick? How would translators be aware that they do work in vain translating something that never will reach the public ever? What is the point making translators do that work?
Comment #8
hass CreditAttribution: hass commentedSo it is POTX or a D7 .po file has been imported to D6? Well I have no clue and no access to infrastructure - so impossible to find and fix the root cause for me.
I only hope I can import views DE 3.2 po file soon. Just as a note I have imported 3.0 without any issues, but the 3.2 has grown by 100kb in size. No idea why.
Comment #9
Gábor HojtsySo how this works is:
1. Module makes release.
2. Localize.drupal.org automatically recognizes the release was made. Downloads and parses with potx.
3. The strings available on the UI are translated by humans. (It is only possible to translate strings that were in the release and parsed out with potx).
4. The translations are exported.
The problem is in 1 and 2, if we are to fix the problem in 4, then translators would do work in vain.
So the problem is (1) the module uses an API not supported in 6 (2) potx parses the API that it should not parse from 6.x. I think primarily the module should be fixed, because its using an API that is not supported in Drupal 6 so it should not expect it to work in the first place. Fixing it in potx would silently ignore the root of the problem. Fixing it in the .po export silently ignore even more problems and make translators work in vain. Therefore my moving it to views.
Comment #10
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue