Moodle
  1. Moodle
  2. MDL-28445

Glossary uses some hardcoded strings

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.3, 2.1, 2.2
    • Fix Version/s: DEV backlog
    • Component/s: Glossary
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Rank:
      18095

      Description

      We can't translate some english strings to correct german strings because they are hard connected in your source code. I found some in moodle/mod/glossary/editcategories.php in Moodle 2.2 (20110719)

      Line 75: $navaction = get_string($action). " " . moodle_strtolower(get_string("category","glossary"));
      Line 100: echo "<h3 class=\"main\">" . get_string("edit"). " " . get_string("category","glossary") . "</h3>";
      Line 122: echo "<p>" . get_string("delete"). " " . get_string("category","glossary"). "</p>";
      Line 166: echo "<h3 class=\"main\">" . get_string("add"). " " . get_string("category","glossary"). "</h3>";
      Line 185: echo "<h3 class=\"main\">" . get_string("add"). " " . get_string("category","glossary"). "</h3>";

      In the german language pack we want to use the following strings:

      Line 75: Add category = Kategorie hinzufügen
      Line 100: Edit category = Kategorie bearbeiten
      Line 122: Delete category = Kategorie löschen
      Line 166: Add category = Kategorie hinzufügen
      Line 185: Add category = Kategorie hinzufügen

      I don't know if there are more hardcoded strings in some other files of the glossary module.

        Activity

        Hide
        Michael de Raadt added a comment -

        So, the issue is not that there are literal strings in the code that cannot be translated, but the composition of the strings is done in an Anglicised way that does not make sense in other languages. To resolve this, new strings would need to be added to the Glossary language file for these specific labels.

        Alternately, would it make sense in German (and possibly other languages) to simply drop the noun "category" (or its translation) and rely only on the verb?

        Show
        Michael de Raadt added a comment - So, the issue is not that there are literal strings in the code that cannot be translated, but the composition of the strings is done in an Anglicised way that does not make sense in other languages. To resolve this, new strings would need to be added to the Glossary language file for these specific labels. Alternately, would it make sense in German (and possibly other languages) to simply drop the noun "category" (or its translation) and rely only on the verb?
        Hide
        Eloy Lafuente (stronk7) added a comment -

        This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

        For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

        Show
        Eloy Lafuente (stronk7) added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: