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

Gábor Hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

What is on that line?

hass’s picture

Status: Postponed (maintainer needs more info) » Active

See http://ftp.drupal.org/files/translations/6.x/views/views-6.x-3.2.de.po

msgctxt "Sort order"

Other +15 follow up lines with msgctxt are also causing this issue, too.

Gábor Hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

I 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?

hass’s picture

Status: Postponed (maintainer needs more info) » Active

Can 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.

msgid "Display a summary"
msgstr "Eine Zusammenfassung anzeigen"
msgid "Skip default argument for view URL"
msgstr "Standard-Argument für die URL der Ansicht überspringen"
msgid ""
"Select whether to include this default argument when constructing the "
"URL for this view. Skipping default arguments is useful e.g. in the "
"case of feeds."
msgstr ""
"Wählen Sie, ob dieses Standard-Argument beim Zusammensetzen der URL "
"für diese Ansicht einbezogen werden soll. Das Überspringen von "
"Standard-Argumenten ist z.B. bei Feeds sinnvoll."
msgid "Number of records"
msgstr "Anzahl der Einträge"
msgctxt "Sort order"
msgid "Default sort"
msgstr ""
"Voreingestellte Sortierung\r\n"
"im Zusammenhang mit: Sortierungereihenfolge"
msgctxt "Sort order"
msgid "Date"
msgstr "Datum"
msgctxt "Sort order"
msgid "Numerical"
msgstr "Numerisch"
msgid ""
"If selected, users can enter multiple values in the form of 1+2+3 (for "
"OR) or 1,2,3 (for AND)."
msgstr ""
"Benutzer können mehrfache Werte der Form 1+2+3 (für ODER) oder 1,2,3 "
"(für UND) eingeben."
msgctxt "Sort order"
msgid "Alphabetical"
msgstr "Alphabetisch"
msgid "Create a label"
msgstr "Bezeichnung erstellen"
msgid "Enable to create a label for this field."
msgstr "Aktivieren, um eine Bezeichnung für dieses Feld zu erstellen."
msgid "Choose the HTML element to wrap around this field, e.g. H1, H2, etc."
msgstr ""
"Wählen Sie das HTML Element, das dieses Feld einschliesst, z.B. H1, "
"H2, etc."
msgid "Create a CSS class"
msgstr "Eine CSS-Klasse erstellen"
msgid "Choose the HTML element to wrap around this label, e.g. H1, H2, etc."
msgstr ""
"Wählen Sie das HTML Element, das diese Beschriftung einschliesst z.B. "
"H1, H2."
msgid "Rewrite results"
msgstr "Ergebnisse überschreiben"
msgid ""
"Enable to override the output of this field with custom text or "
"replacement tokens."
msgstr ""
"Aktivieren, um die Ausgabe des Feldes mit benutzerdefiniertem Text "
"oder Ersetzungs-Tokens zu übersteuern."
msgid "Replace spaces with dashes"
msgstr "Leerzeichen durch Striche ersetzen"
msgid "External server URL"
msgstr "Externe Server-URL"
msgid ""
"Links to an external server using a full URL: e.g. "
"'http://www.example.com' or 'www.example.com'."
msgstr ""
"Links zu einer externen Website brauchen eine komplette URL, z.B. "
"‚http://www.example.com‘ oder ‚www.beispiel.com‘."
msgid "Enable to trim the field to a maximum length of characters"
msgstr "Das Feld auf eine maximale Länge an Zeichen beschränken."
msgid "Convert newlines to HTML <br> tags"
msgstr "Zeilenumbrüche in <br> HTML-Tags umwandeln"
msgid ""
"If checked, all newlines chars (e.g. \\n"
") are converted into HTML <br> tags."
msgstr ""
"Alle Zeilenumbruchzeichen (z.B. \\n"
") werden in HTML <br> Tags umgewandelt."
Gábor Hojtsy’s picture

Title: views-6.x-3.2.de.po syntax error in line 4798 » Views 6.x somehow includes string with context (unsupported)
Project: localize.drupal.org » Views (for Drupal 7)
Version: 7.x-1.x-dev » 6.x-3.2
Component: Infrastructure » Code
Priority: Major » Normal

There 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.

hass’s picture

That means the localization server packaging has a bug as it exported the D6 po files with context. How can we fix this now?

Gábor Hojtsy’s picture

Its 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?

hass’s picture

So 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.

Gábor Hojtsy’s picture

So 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.

Chris Matthews’s picture

Status: Active » Closed (outdated)

The 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