Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrize giella-core/scripts/xsl/generate_lex-fileVM.xsl with language-spec mods (Bugzilla Bug 2462) #62

Open
albbas opened this issue May 6, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@albbas
Copy link
Contributor

albbas commented May 6, 2018

This issue was created automatically with bugzilla2github

Bugzilla Bug 2462

Date: 2018-05-06T16:49:26+02:00
From: Sjur Nørstebø Moshagen <<sjur.n.moshagen>>
To: Sjur Nørstebø Moshagen <<sjur.n.moshagen>>
CC: borre.gaup, chiara.argese, ciprian.gerstenberger, ftyers, rueter.jack

Last updated: 2018-05-07T08:03:43+02:00

@albbas
Copy link
Contributor Author

albbas commented May 6, 2018

Comment 12760

Date: 2018-05-06 16:49:26 +0200
From: Sjur Nørstebø Moshagen <<sjur.n.moshagen>>

[Recreation of bug #2455 from Jan 9, which got lost in the disk crash around Jan 29. Newest backup data is from Jan 5, around 4 AM. Recreation based on bugzilla mails received by me. If there are more comments, please add to this bug by copying in text from old e-mails.]

Today, xml to lexc lexicon conversion uses the xsl script

giella-core/scripts/xsl/generate_lex-fileVM.xsl in the following way

  1. It is the same script for all lgs
  2. It picks the fin translation
  3. It picks the whole translation

We want:

  1. a makefile condition saying:
    if the generate_lex-fileVM.xsl exists in $LANG/src/scripts, use that
    if not, use the one in giella-core

  2. For the local script to be made in mhr (and elsewhere ad lib),
    a. ask for eng, and not fin translations
    b. if eng does not exist, ask for fin (i.e. have a fallback)
    c. do not take the whole translation , but cut at the first "," or ";"
    d. remove any content in parenthesis before this comma

@albbas
Copy link
Contributor Author

albbas commented May 7, 2018

Comment 12764

Date: 2018-05-07 04:20:44 +0200
From: Jack Rueter <<rueter.jack>>

Number 3. should be >> picks the entire translation of the FIRST t element content by default

              <xsl:choose>
                <xsl:when test="../../../mg[1]/tg[@xml:lang='fin']/t[1]">
                  <xsl:value-of select="normalize-space(../../../mg[1]/tg[@xml:lang='fin']/t[1])"/>
                </xsl:when>

@albbas
Copy link
Contributor Author

albbas commented May 7, 2018

Comment 12768

Date: 2018-05-07 07:57:43 +0200
From: Sjur Nørstebø Moshagen <<sjur.n.moshagen>>

[Original comment on bug report from Jack Rueter on Jan 11]

(In reply to Trond Trosterud from comment #0)

Today, xml to lexc lexicon conversion uses the xsl script

giella-core/scripts/xsl/generate_lex-fileVM.xsl in the following way

  1. It picks the fin translation
  2. It picks the whole translation

CORRECTION to what the script does:
2. It picks the fin translation (tg) of the first mg element
3. It picks only the first t element content

We want:

  1. a makefile condition saying:
    if the generate_lex-fileVM.xsl exists in $LANG/src/scripts, use that
    if not, use the one in giella-core

  2. For the local script to be made in mhr (and elsewhere ad lib),
    a. ask for eng, and not fin translations
    b. if eng does not exist, ask for fin (i.e. have a fallback)
    c. do not take the whole translation , but cut at the first "," or ";"
    d. remove any content in parenthesis before this comma

It would be even BETTER if there were a possibility to select other languages,
too, i.e. someone might want to use fra or rus.

@albbas albbas transferred this issue from giellalt/bugzilla-dummy Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants