From 71725837faa60e068e2771ed93814db62923fbc6 Mon Sep 17 00:00:00 2001
From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Date: Tue, 28 Apr 2020 21:21:09 -0300
Subject: [PATCH] Bug 24636: translate planning sections

This patch adds a new inc file to process
and translate plannig sections

To test:
1) Apply patch
2) Create new language files
(cd misc/translator; ./translate create xx-YY)
3) Verify new file is taken into account in
translation files
egrep -n budget_planning misc/translator/xx-YY*.po
check new strings in staff-prog file
4) Go to Administration > Budgets > Founds > Planning
select different options, check page title and
'Planning for...' phrase
5) Translate strings, install new language, enable it,
verify the text change with options like point 4)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
---
 koha-tmpl/intranet-tmpl/prog/en/includes/budget_planning.inc | 7 +++++++
 koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt      | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/budget_planning.inc

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budget_planning.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budget_planning.inc
new file mode 100644
index 0000000000..ff8cdee94e
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budget_planning.inc
@@ -0,0 +1,7 @@
+[%- BLOCK planning -%]
+  [%- SWITCH plan -%]
+    [%- CASE 'MONTHS'    -%]<span>months</span>
+    [%- CASE 'BRANCHES'  -%]<span>libraries</span>
+    [%- CASE 'ITEMTYPES' -%]<span>item types</span>
+  [%- END -%]
+[%- END -%]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
index e714e87e2a..6872142843 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
@@ -3,7 +3,8 @@
 [% USE Price %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Funds &rsaquo; Planning for [% budget_period_description | html %] by [% authcat | html %]</title>
+[% PROCESS 'budget_planning.inc' %]
+<title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Funds &rsaquo; Planning for [% budget_period_description | html %] by [% PROCESS planning plan=authcat %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <style>td.locked { background-image: url('[% interface | html %]/[% theme | html %]/img/locked.png'); padding-left : 20px; background-repeat: no-repeat; background-position: 5px 5px; } a.control { font-size:85%;text-decoration:none; } .plan_entry { text-align: right; width:90%; }</style>
 </head>
@@ -28,7 +29,7 @@
 [% INCLUDE 'budgets-admin-toolbar.inc' %]
 
 <form method="post" id="Aform" name="Aform"  action="/cgi-bin/koha/admin/aqplan.pl">
-<h3>Planning for [% budget_period_description | html %] by [% authcat | html %]</h3>
+<h3>Planning for [% budget_period_description | html %] by [% PROCESS planning plan=authcat %]</h3>
 <input type="hidden" name="authcat" value="[% authcat | html %]" />
 <!-- Budget Lines -->
 
-- 
2.11.0