Bugzilla – Attachment 63849 Details for
Bug 18701
Translatability: Get rid of exposed tt directives in matching-rules.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18701: Translatability: Get rid of exposed tt directives in matching-rules.tt
Bug-18701-Translatability-Get-rid-of-exposed-tt-di.patch (text/plain), 7.65 KB, created by
Marc Véron
on 2017-05-30 15:56:03 UTC
(
hide
)
Description:
Bug 18701: Translatability: Get rid of exposed tt directives in matching-rules.tt
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-05-30 15:56:03 UTC
Size:
7.65 KB
patch
obsolete
>From be411e439fd139ca468e9a628c123cd9792c7acc Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Tue, 30 May 2017 17:50:57 +0200 >Subject: [PATCH] Bug 18701: Translatability: Get rid of exposed tt directives > in matching-rules.tt > >Translation for file matching-rules.tt exposes a lot of template directives. > >Translators should not be confronted with internal code like the following: > >[%% PROCESS norms_select selected_norm=\"none\" id=\"mc_1_src_c_1_n_1_norm\" "name=\"mc_1_src_c_1_n_1_norm\" %%] > >To test: >- Apply patch >- Verify that code changes make sense (removes line breaks in directives) >- Run QA tools in newset version (tests for line breaks in tt) >- Bonus test: create a new translation e.g. fpr language 'aa-AA', verify > that such lines no longer appear in po/aa-AA-staff-prog.po > (for matching-rules.tt) >--- > .../prog/en/modules/admin/matching-rules.tt | 57 +++++----------------- > 1 file changed, 12 insertions(+), 45 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >index f6a33ad..640e6a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >@@ -328,11 +328,8 @@ function CheckRuleForm(f) { > [% FOREACH norm IN component.norms %] > <li id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n_[% norm.norm_num %]"> > <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n__[% norm.norm_num %]_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm=norm.norm >- id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm" >- name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm" >- %] >+ [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] >+ [% PROCESS norms_select selected_norm=norm.norm id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm" name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm" %] > </li> > [% END %] > </ol> >@@ -380,11 +377,7 @@ function CheckRuleForm(f) { > </li> > <li id="mp_1_c_1_n_1"> > <label for="mp_1_c_1_n_1_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm="none" >- id="mp_1_c_1_n_1_norm" >- name="mp_1_c_1_n_1_norm" >- %] >+ [% PROCESS norms_select selected_norm="none" id="mp_1_c_1_n_1_norm" name="mp_1_c_1_n_1_norm" %] > </li> > </ol> > </fieldset> >@@ -441,11 +434,8 @@ function CheckRuleForm(f) { > [% FOREACH norm IN src_component.norms %] > <li id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]"> > <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm=norm.norm >- id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" >- name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" >- %] >+ [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] >+ [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" %] > </li> > [% END %] > </ol> >@@ -486,11 +476,8 @@ function CheckRuleForm(f) { > [% FOREACH norm IN tgt_component.norms %] > <li id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]"> > <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm=norm.norm >- id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" >- name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" >- %] >+ [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] >+ [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" %] > </li> > [% END %] > </ol> >@@ -526,11 +513,7 @@ function CheckRuleForm(f) { > </li> > <li id="mc_1_src_c_1_n_1"> > <label for="mc_1_src_c_1_n_1_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm="none" >- id="mc_1_src_c_1_n_1_norm" >- name="mc_1_src_c_1_n_1_norm" >- %] >+i [% PROCESS norms_select selected_norm="none" id="mc_1_src_c_1_n_1_norm" name="mc_1_src_c_1_n_1_norm" %] > </li> > </ol> > </fieldset> >@@ -556,11 +539,7 @@ function CheckRuleForm(f) { > </li> > <li id="mc_1_tgt_c_1_n_1"> > <label for="mc_1_tgt_c_1_n_1_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm="none" >- id="mc_1_tgt_c_1_n_1_norm" >- name="mc_1_tgt_c_1_n_1_norm" >- %] >+ [% PROCESS norms_select selected_norm="none" id="mc_1_tgt_c_1_n_1_norm" name="mc_1_tgt_c_1_n_1_norm" %] > </li> > </ol> > </fieldset> >@@ -671,11 +650,7 @@ function CheckRuleForm(f) { > </li> > <li id="mp_num_c_1_n_1"> > <label for="mp_num_c_1_n_1_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm="none" >- id="mp_num_c_1_n_1_norm" >- name="mp_num_c_1_n_1_norm" >- %] >+ [% PROCESS norms_select selected_norm="none" id="mp_num_c_1_n_1_norm" name="mp_num_c_1_n_1_norm" %] > </li> > </ol> > </fieldset> >@@ -708,11 +683,7 @@ function CheckRuleForm(f) { > </li> > <li id="mc_num_src_c_1_n_1"> > <label for="mc_num_src_c_1_n_1_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm="none" >- id="mc_num_src_c_1_n_1_norm" >- name="mc_num_src_c_1_n_1_norm" >- %] >+ [% PROCESS norms_select selected_norm="none" id="mc_num_src_c_1_n_1_norm" name="mc_num_src_c_1_n_1_norm" %] > </li> > </ol> > </fieldset> >@@ -737,11 +708,7 @@ function CheckRuleForm(f) { > </li> > <li id="mc_num_tgt_c_1_n_1"> > <label for="mc_num_tgt_c_1_n_1_norm">Normalization rule: </label> >- [% PROCESS norms_select >- selected_norm="none" >- id="mc_num_tgt_c_1_n_1_norm" >- name="mc_num_tgt_c_1_n_1_norm" >- %] >+ [% PROCESS norms_select selected_norm="none" id="mc_num_tgt_c_1_n_1_norm" name="mc_num_tgt_c_1_n_1_norm" %] > </li> > </ol> > </fieldset> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18701
:
63849
|
63989