#749 TBX handling: also allow partial language match

closed-invalid
nobody
5
2012-01-11
2012-01-11
No

Currently, the languages in a TBX must match fully (ignoring case) to allow the TBX entries to be used.

For example, when source language is EN-US, only glossary entries in the language EN-US will be used.

I think it would be helpful to also use glossary entries in the language EN (without specifying culture US or GB or ...). So instead of a full match, a partial match would suffice.

If ok, this would require a change in GlossaryTBXReader.java, line 107-118, such as:

if (sLang.equalsIgnoreCase(lang)) {

Discussion

  • Didier Briel

    Didier Briel - 2012-01-11

    I don't reproduce or understand your issue.

    With an EN-GB source language project, I do get entries from the MS glossary (which is EN-US).
    With an EN language project, I do get the same entries, too.

    The lines you mention are 104 and 113 in /trunk, and seem to correspond to your proposed change:
    104:
    if (sLang.equalsIgnoreCase(lang)) {

    113:
    if (sLang.equalsIgnoreCase(lang)) {

    Didier

     
  • Didier Briel

    Didier Briel - 2012-01-11
    • milestone: 442218 -->
    • status: open --> closed-invalid
     
  • Guido Leenders

    Guido Leenders - 2012-01-11

    Hi Didier,

    very incorrect of me. For this one I did not build a test case, but just went into the code only.

    Currently, the sLang and tLang are only based on language code (such as EN), not on the full such as EN-US.

    And the compare only compares the language, not the culture.

    This means that the problem is the other way around (if there is a problem):

    If you have a glossary with EN-GB entries (see attachment) and a project with EN-US source, the match will be made although the cultures are different.

    But I do not know whether for instance Mexican Spanish and Spanish Spanish differ so much in terms of their definitions.

     
  • Didier Briel

    Didier Briel - 2012-01-11

    Yes, we know that EN-GB entries match EN-US sources, and it's on purpose.

    Although there are multilingual glossaries, I have never seen one with mixed language variants in the same glossary. So, if you don't like the entries you get, simply do not use that glossary.

    Didier

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks