Bug 30373: Enable translation of UNIMARC frameworks

This patch adds a new translation file, *-installer-UNIMARC.po

To test:
1. On top of all previous patches
2. Apply this patch
3. Create (or update) some language
Ej.
    misc/translation/translate create xx-YY

    verify new file misc/translation/po/xx-YY-installer-UNIMARC.po
4. Install new language
    misc/translation/translate install xx-YY

    verify new dirs:
        installer/data/mysql/xx-YY/marcflavour/unimarc/{mandatory,optional}

5. Repeat install procedure selecting xx-YY language and UNIMARC
   verify all frameworks are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Bernardo Gonzalez Kriegel 2022-03-28 00:50:01 -03:00 committed by Jonathan Druart
parent c22aa12c05
commit 3bb452eb73
2 changed files with 11 additions and 1 deletions

View File

@ -126,6 +126,11 @@ const poTasks = {
create: po_create_installer_marc21,
update: po_update_installer_marc21,
},
'installer-UNIMARC': {
extract: po_extract_installer_unimarc,
create: po_create_installer_unimarc,
update: po_update_installer_unimarc,
},
};
const poTypes = Object.keys(poTasks);
@ -237,6 +242,8 @@ function po_extract_installer_marc (type) {
function po_extract_installer_marc21 () { return po_extract_installer_marc('MARC21') }
function po_extract_installer_unimarc () { return po_extract_installer_marc('UNIMARC') }
function po_create_type (type) {
const access = util.promisify(fs.access);
const exec = util.promisify(child_process.exec);
@ -276,6 +283,7 @@ function po_create_messages () { return po_create_type('messages') }
function po_create_messages_js () { return po_create_type('messages-js') }
function po_create_installer () { return po_create_type('installer') }
function po_create_installer_marc21 () { return po_create_type('installer-MARC21') }
function po_create_installer_unimarc () { return po_create_type('installer-UNIMARC') }
function po_update_type (type) {
const access = util.promisify(fs.access);
@ -312,6 +320,7 @@ function po_update_messages () { return po_update_type('messages') }
function po_update_messages_js () { return po_update_type('messages-js') }
function po_update_installer () { return po_update_type('installer') }
function po_update_installer_marc21 () { return po_update_type('installer-MARC21') }
function po_update_installer_unimarc () { return po_update_type('installer-UNIMARC') }
/**
* Gulp plugin that executes xgettext-like command `cmd` on all files given as

View File

@ -126,7 +126,8 @@ sub new {
# EN UNIMARC YAML installer files
push @{$self->{installer}}, {
name => "UNIMARC YAML installer files",
dirs => [ 'installer/data/mysql/en/marcflavour/unimarc/mandatory', ],
dirs => [ 'installer/data/mysql/en/marcflavour/unimarc/mandatory',
'installer/data/mysql/en/marcflavour/unimarc/optional'],
suffix => "-installer-UNIMARC.po",
};