https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79842

            Bug ID: 79842
           Summary: i18n: subword translation in "Can't use the same
                    %smodule"
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roland.illig at gmx dot de
  Target Milestone: ---

gfc_fatal_error ("Can't USE the same %smodule we're building!",
                 p->state == COMP_SUBMODULE ? "sub" : "");

The message is either of these:
* "Can't USE the same module we're building!"
* "Can't USE the same submodule we're building!"

As a translator, I have no chance of providing a proper translation for this,
since the word part "sub" is always introduced.

Translations should always be complete sentences. In this case, the easiest
solution is this:

  for (p = gfc_state_stack; p; p = p->previous)
    if ((p->state == COMP_MODULE || p->state == COMP_SUBMODULE)
         && strcmp (p->sym->name, module_name) == 0)
      if (p->state == COMP_SUBMODULE)
        gfc_fatal_error ("Can't USE a submodule that is currently built");
      else
        gfc_fatal_error ("Can't USE a module that is currently built");

This also fixes #79840 by removing the exclamation mark and rewording the
diagnostic.

Reply via email to