Currently, the authorized values for the ERM categories are in installer/data/mysql/mandatory/auth_val_cat.sql which is the file for authorized value categories, and not translatable. These should be moved to installer/data/mysql/en/mandatory/auth_values.yml so that each language can translate them.
Created attachment 146413 [details] [review] Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml This patch moves the authorized value insertions for ERM categories into the language-specific auth_values.yml file. To test: 1. Count the number of authorized values in the mandatory categories select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); --> There should be 929 2. Delete the authorized values from these categories delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); 3. Apply patch 4. Load the mandatory authorized values ./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load 5. Redo step 1 --> There should be the same number (929) 6. Update translations cd misc/translator ./translate update xx-XX 7. Search the po/xx-XX-installer.po file for any of the loaded authorized values For example, grep AbstractAndIndex po/xx-XX-installer.po grep "Abstract and index" po/xx-XX-installer.po --> authorized values and descriptions should be translatable
Created attachment 146438 [details] [review] Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml This patch moves the authorized value insertions for ERM categories into the language-specific auth_values.yml file. To test: 1. Count the number of authorized values in the mandatory categories select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); --> There should be 929 2. Delete the authorized values from these categories delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); 3. Apply patch 4. Load the mandatory authorized values ./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load 5. Redo step 1 --> There should be the same number (929) 6. Update translations cd misc/translator ./translate update xx-XX 7. Search the po/xx-XX-installer.po file for any of the loaded authorized values For example, grep "Abstract and index" po/xx-XX-installer.po --> descriptions should be translatable
I had originally made the authorized values themselves translatable since they are English words, and for historical and legal reasons, that doesn't always fly here. Unfortunately, some of them trigger actions (like the 'closed' ERM_AGREEMENT_STATUS makes the 'Closure reason' drop down active in agreements), so we can't translate them... at least not all of them. Since I'm not sure which ones trigger actions, I removed all of them from the translations. Now, only the descriptions are translatable.
(In reply to Caroline Cyr La Rose from comment #3) > I had originally made the authorized values themselves translatable since > they are English words, and for historical and legal reasons, that doesn't > always fly here. > > Unfortunately, some of them trigger actions (like the 'closed' > ERM_AGREEMENT_STATUS makes the 'Closure reason' drop down active in > agreements), so we can't translate them... at least not all of them. Since > I'm not sure which ones trigger actions, I removed all of them from the > translations. Now, only the descriptions are translatable. Looking at the values I wish they'd follow a bit more closely recommendations for authorised values, not using _ (we do recommend against these for locations and collections for search reasons) and using capital letters. It would also make it easier to see that these are CODES and not words. But... as Caroline said, we cannot change this easily and it's an oversight that is hard to fix now (and certainly should not be fixed here.
Created attachment 146983 [details] [review] Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml This patch moves the authorized value insertions for ERM categories into the language-specific auth_values.yml file. To test: 1. Count the number of authorized values in the mandatory categories select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); --> There should be 929 2. Delete the authorized values from these categories delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); 3. Apply patch 4. Load the mandatory authorized values ./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load 5. Redo step 1 --> There should be the same number (929) 6. Update translations cd misc/translator ./translate update xx-XX 7. Search the po/xx-XX-installer.po file for any of the loaded authorized values For example, grep "Abstract and index" po/xx-XX-installer.po --> descriptions should be translatable Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 146984 [details] [review] Bug 32918: (follow-up) Add new lines for formatting consistency This adds new lines between each authorised value for better readability and to match the formatting of the rest of the file. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 147132 [details] [review] Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml This patch moves the authorized value insertions for ERM categories into the language-specific auth_values.yml file. To test: 1. Count the number of authorized values in the mandatory categories select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); --> There should be 929 2. Delete the authorized values from these categories delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); 3. Apply patch 4. Load the mandatory authorized values ./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load 5. Redo step 1 --> There should be the same number (929) 6. Update translations cd misc/translator ./translate update xx-XX 7. Search the po/xx-XX-installer.po file for any of the loaded authorized values For example, grep "Abstract and index" po/xx-XX-installer.po --> descriptions should be translatable Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 147133 [details] [review] Bug 32918: (follow-up) Add new lines for formatting consistency This adds new lines between each authorised value for better readability and to match the formatting of the rest of the file. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
Not needed for 22.05.x, no backport.