[OPEN-ILS-GENERAL] Fixed-field elements mnemonic names translations

Ben Shum ben at evergreener.net
Mon Mar 26 14:27:34 EDT 2018


Hi Eva,

I'm still studying this to learn how it works in the web client, but I
think that the fixed field labels get defined out of:

Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2
Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js

In the tt2 file, there are plenty of entries like:

<eg-marc-edit-fixed-field fixed-field="Ctry"
record="record"></eg-marc-edit-fixed-field>

And then in the marcedit.js file, I see stuff like:

<div class="col-md-1"><label name="{{fixedField}}"
for="{{fixedField}}_ff_input">{{fixedField}}</label></div>
<div class="col-md-1"><input type="text" style="padding-left: 5px;
margin-left: 1em" size="4" id="{{fixedField}}_ff_input"/></div>

I think this is how the various fixed fields are generated for the editor tool.

However, what I'm not seeing in here is how we might apply i18n
translations.  It would appear that the {{fixedField}} variable is
used for the <label></label> straight away.  And there isn't a
corresponding mapping to bring in a translated value for those labels.
If translation were allowed here, I would think that it should be able
to support longer character strings and Czech characters in the
translated labels.  As long as the only thing translated were the
labels, not the variables behind the scenes.

Still investigating, but could probably use more developer input on this arena.

-- Ben

On Mon, Mar 26, 2018 at 12:34 PM, Cerninakova Eva <cernin at jabok.cz> wrote:
> Hi all,
>
>
> I have a question about translation of fixed-field elements mnemonic names
> (like BLvl, DtSt, Audn etc, see
> https://www.oclc.org/bibformats/en/fixedfield.html.) used in Evergreen in
> the fixed field grid. We have not translated the mnemonic names to Czech yet
> (and as far as a know, neither they have  been  translated to some of
> supported Evergreen languages). However,  it turned out eventually,  that
> the using of English mnemonic names is not very practical for Czech
> catalogers. That is why we would like to translate them to Czech now. At
> this point two practical question came up:
>
> 1. Must translation necessarily consist of only  four characters, as the
> original mnemonic names mostly do? Or would it be possible use to use more
> characters for translation, possibly from six to eight (e.g. Ctry translate
> as ZemVyd, or GPub translate as VladPub) without causing a crush of the fix
> field grid interface?
>
> 2. Is it safe to use a special Czech characters (extended ASCII characters
> like ž, š, č, ř ...) for mnemonic names translation? Or could i cause a
> problem?
>
>
> Thanks in advance for an answer
>
> Eva
>
>
>
> ---
> Mgr. Eva Cerniňáková
> cernin at jabok.cz
> Tel. +420 211 222 409
>
> Knihovna Jabok
> http:/knihovna.jabok.cz
> Tel.  +420 211 222 410
> Jabok - Vyšší odborná škola sociálně pedagogická a teologická
> Salmovská 8, 120 00 Praha 2
>



-- 
Benjamin Shum
Evergreener


More information about the Open-ils-general mailing list