Strange quote use in po file

I am trying to sort out some missing transaltions in nb_NO.

Issue 1: Our backend shows ##default.genres.article##, but in default.po it is clearly adressed:

msgid “default.genres.article”
msgstr “Artikkeltekst”

So what could cause OJS to not display the correct text?

Issue 2: In several of the po files the use of quote marks seems strange:

  1. msgid “default.contextSettings.checklist.notPreviouslyPublished”
  2. msgstr “”
  3. "Manuskriptet er ikke tidligere publisert, og er heller ikke til vurdering i "
  4. "noe annet tidsskrift (eller gi forklaring i feltet 'Kommentarer til "
  5. “redaktøren’).”

Wouldn’t the double quote after msgstr mean that the translation is empty? and anything after it ignored?

Best regards
Geir

Hi @geirrosset,

Issue 1: Our backend shows ##default.genres.article##, but in default.po it is clearly addressed…

The entries in default.po are loaded into the database when a journal is created; it’s likely that the translation was incomplete when that was done. After the journal is created, you’ll need to edit these entries manually in the journal settings.

Issue 2: In several of the po files the use of quote marks seems strange…

Believe it or not, this is the way .po gettext files are supposed to look. See the gettext documentation:

When the time comes to write multi-line strings, one should not use escaped newlines. Instead, a closing quote should follow the last character on the line to be continued, and an opening quote should resume the string at the beginning of the following PO file line. For example:

msgid ""
"Here is an example of how one might continue a very long string\n"
"for the common case the string represents multi-line output.\n"

In this example, the empty string is used on the first line, to allow better alignment of the H from the word ‘Here’ over the f from the word ‘for’. In this example, the msgid keyword is followed by three strings, which are meant to be concatenated. Concatenating the empty string does not change the resulting overall string, but it is a way for us to comply with the necessity of msgid to be followed by a string on the same line, while keeping the multi-line presentation left-justified, as we find this to be a cleaner disposition.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like