Menu β–Ύ β–΄

#465 Lack of language codes does not trigger error

2.0
closed-out-of-date
1
2025-08-11
2010-04-27
No

When a project is created by an independent script outside of OmegaT without entering language codes, that project when opened by OmegaT does not trigger alert messages and the TMX created during the translation are not valid since they do not have language codes.

OmegaT currently does not accept projects without language codes: when the codes are erased from the properties dialog, an alert is displayed.

OmegaT should alert the user when a project to open does not contain valid values for the language codes just like it does when opening a project that does not have valid paths for project folders.

Related

Bugs: #465

Discussion

  • Didier Briel

    Didier Briel - 2011-05-20

    Given the probability of this happening (project created outside of OmegaT without language code), I lower the priority.

    Didier

     
  • Didier Briel

    Didier Briel - 2011-05-20
    • priority: 5 --> 1
    • summary: lack of language codes does not trigger error --> Lack of language codes does not trigger error
     
  • Hiroshi Miura

    Hiroshi Miura - 2025-08-11

    The fix is proposed as PR#1604
    https://github.com/omegat-org/omegat/pull/1604

     
    πŸ‘
    1
  • Hiroshi Miura

    Hiroshi Miura - 2025-08-11
    • assigned_to: Hiroshi Miura
     
  • Hiroshi Miura

    Hiroshi Miura - 2025-08-11
    • status: open --> closed-out-of-date
     
  • Jean-Christophe Helary

    One issue described here is still valid :

    without entering language codes, that project when opened by OmegaT does not trigger alert messages

    We should have an alert for the lack of codes as I proposed in my comment here:
    https://github.com/omegat-org/omegat/pull/1604#issuecomment-3173887459

     
    • Hiroshi Miura

      Hiroshi Miura - 2025-08-11

      Thank you for the clarification. This provides crucial context that changes the technical approach needed.
      Since the original ticket was raised 15 years ago, the current OmegaT behavior has evolved to treat empty language codes as "und" (undetermined language) rather than throwing an error. This means:

      The current behavior is intentional - not a bug but a design decision
      My parser fix may be too strict - breaking the established "und" fallback behavior
      The real issue might be lack of user notification rather than technical failure

      Before proceeding, we need to clarify the intended behavior:

      Should empty language codes continue to default to "und" with a warning message?
      Or should they be treated as validation errors that prevent project opening?
      What's the impact on existing projects that rely on the "und" fallback?

      Could you provide:

      Examples of projects where "und" behavior causes problems
      Whether this should be a warning vs. error
      Backward compatibility requirements for existing projects

      This helps me understand whether we need a notification enhancement rather than a validation fix.

      2025εΉ΄8月11ζ—₯ζœˆζ›œζ—₯ 18:49 に Jean-Christophe Helary brandelune@users.sourceforge.net が作成:

      One issue described here is still valid :

      without entering language codes, that project when opened by OmegaT does not trigger alert messages

      We should have an alert for the lack of codes as I proposed in my comment here:
      https://github.com/omegat-org/omegat/pull/1604#issuecomment-3173887459


      [bugs:#465] Lack of language codes does not trigger error

      Status: closed-out-of-date
      Group: 2.0
      Labels: Application
      Created: Tue Apr 27, 2010 01:37 AM UTC by Jean-Christophe Helary
      Last Updated: Mon Aug 11, 2025 09:38 AM UTC
      Owner: Hiroshi Miura

      When a project is created by an independent script outside of OmegaT without entering language codes, that project when opened by OmegaT does not trigger alert messages and the TMX created during the translation are not valid since they do not have language codes.

      OmegaT currently does not accept projects without language codes: when the codes are erased from the properties dialog, an alert is displayed.

      OmegaT should alert the user when a project to open does not contain valid values for the language codes just like it does when opening a project that does not have valid paths for project folders.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/omegat/bugs/465/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #465

      • Jean-Christophe Helary

        Regarding the intended behavior:

        • OmegaT does not validate the xml:lang codes, so anything can be used
        • in this regard, "und" is an acceptable value (although it should be "undefined", to avoid any misunderstanding)
        • we need to warn users that having the same language code in source and target is not acceptable since OmegaT won’t be able to read the contents of project_save.tmx with identical codes.
        • since identical codes keep OmegaT from properly running, the warning should probably force users to change the language codes, maybe by displaying the Project Properties dialog
         

Log in to post a comment.

MongoDB Logo MongoDB