Bug 25923 - pr-BR translations breaks Tools (Ferramentas) menu and submenus
Summary: pr-BR translations breaks Tools (Ferramentas) menu and submenus
Status: RESOLVED MOVED
Alias: None
Product: Project Infrastructure
Classification: Unclassified
Component: Bugzilla (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 - low major
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-03 13:33 UTC by Steven F. Schmieder
Modified: 2020-07-12 10:03 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Examples of erroneous lines in pt-BR code (10.09 KB, text/html)
2020-07-03 13:33 UTC, Steven F. Schmieder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven F. Schmieder 2020-07-03 13:33:21 UTC
Created attachment 106508 [details]
Examples of erroneous lines in pt-BR code

When updating translations to Koha version 20.05.01 using pt-BR (Brazilian Portuguese) coding errors are introduced into several files making the Tools (Ferramentas) and submenus inoperable. An "internal server error" message is displayed.

The coding errors are found in at least two file that I can identify:

/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/pt-BR/modules/tools/tools-home.tt

/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/pt-BR/includes/tools-menu.inc

For example (there is more than one error in each file), in the file "tools-home.tt" at line 16, the original file has:

[% IF (CAN_user_tools_manage_patron_lists || || CAN_user_clubs CAN_user_tools_moderate_comments || || CAN_user_tools_import_patrons CAN_user_tools_edit_notices || || CAN_user_tools_edit_notice_status_triggers CAN_user_tools_label_creator || || CAN_user_tools_delete_anonymize_patrons CAN_user_tools_edit_patrons || || CAN_user_tools_batch_extend_due_dates CAN_user_tools_moderate_tags || (CAN_user_tools_batch_upload_patron_images && Koha.Preference ('patronimages') ) ) %]  <h3>Usuários e circulação</h3>

The line should be:

[% IF (CAN_user_tools_manage_patron_lists || CAN_user_clubs || CAN_user_tools_moderate_comments || CAN_user_tools_import_patrons || CAN_user_tools_edit_notices || CAN_user_tools_edit_notice_status_triggers || CAN_user_tools_label_creator || CAN_user_tools_delete_anonymize_patrons || CAN_user_tools_edit_patrons || CAN_user_tools_batch_extend_due_dates || CAN_user_tools_moderate_tags || (CAN_user_tools_batch_upload_patron_images && Koha.Preference ('patronimages') ) ) %]  <h3>Usuários e circulação</h3>

In the file "tools-menu.inc" at line 8, the original file has:

[% IF (CAN_user_tools_manage_patron_lists || || CAN_user_clubs CAN_user_tools_moderate_comments || || CAN_user_tools_import_patrons CAN_user_tools_edit_notices || || CAN_user_tools_edit_notice_status_triggers CAN_user_tools_label_creator || || CAN_user_tools_delete_anonymize_patrons CAN_user_tools_edit_patrons || || (CAN_user_tools_moderate_tags CAN_user_tools_batch_upload_patron_images && Koha.Preference ('patronimages') ) ) % ] <h5>Usuários e circulação</h5>

The line should be:

[% IF (CAN_user_tools_manage_patron_lists || CAN_user_clubs || CAN_user_tools_moderate_comments || CAN_user_tools_import_patrons || CAN_user_tools_edit_notices || CAN_user_tools_edit_notice_status_triggers || CAN_user_tools_label_creator || CAN_user_tools_delete_anonymize_patrons || CAN_user_tools_edit_patrons || CAN_user_tools_moderate_tags || ( CAN_user_tools_batch_upload_patron_images && Koha.Preference('patronimages') ) ) %] <h5>Usuários e circulação</h5>

There are other errors in both files. Theses are just two examples. 

Running "koha-translate --update pt-BR" reproduces the erroneous files.

Manually editing both files solves the problem.
Comment 1 Katrin Fischer 2020-07-12 10:03:00 UTC
Hi Steven, 

usually translation errors like these need to be fixed on translate.koha-community.org where we maintain the po files used for translations.

The files from there are then shipped with every release of Koha. 

I have copied the original English into the translations on translate now for pr-BR now and hope this will fix the issue. But please check!