Bug 10823: add class info to enumchron data in detail.tt, for better styling

This patch adds spans to style parts of the enumchron and serialseq
information in the holdings table in the taff interface:

These include:

- items.enumchron
- the separator used
- serial.serialseq
- items.publisheddate

TEST PLAN
---------
1) Apply patch 10825
2) Find a biblio where the enumchron and serialseq are different.
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serilaitems.itemnumber
        AND serialitems.serialid=serial.serialid;
3) In the staff client, view the source for that item.
   -- It should be one class for the entire <td> cell.
4) Apply patch 10823
5) Refresh the page
6) Look at the source for that item again.
   -- It should have <span> tags around the 4 things listed
      above.
7) Run the koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only, no regression found.
Using [%- -%] could improve readability of HTML source code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11631: Make i18n toolchain ignore useless strings

This patch removes several types of strings from the
PO files that cannot be usefully translated, including
ones that consist entirely of punctuation and/or HTML entities.

Test:
1) Update PO files of some lang, xx-YY-*po
cd misc/translator
perl translate update xx-YY
2) Do it again, just in case
3) rm po/xx-YY*po~
4) Extract all msgid's, sorted
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-pre
5) Apply the patch
6) Repeat 1-3
7) Repeat 4 again, other file
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-post
8) Do a diff, inspect results, only strings with %s and \s
diff xx-YY-pre xx-YY-post | less

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, 380 strings less to 'translate'
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11497: remove TT construct for picking a default string that i18n toolchain fails to pick up

The i18n toolchain fails to pick up constant text defined inside
[% ... %].  In particular, in a construct like this

  [% var OR "string" %]

the string "string" will not be available to be translated.

This patch fixes all the cases I could find.

To test:
1. Update your preferred language
(cd misc/translator; perl translate update fi-FI)

2. Count headers for example
egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l

3. Apply the patch

4. Repeat 1 and 2, now there are more lines
Or translate to some lang and visit every touched page and look the title

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Template changes only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12138 - Use placeholders in translatable Javascript strings

Currently translating Javascript strings with variables in them is hard,
because the strings are created from separate parts. For example:

 _("Are you sure you want to delete the") + " " + count + " " +
_("attached items?")

This is translated in two different parts, and the translator cannot
affect the place where the count-variable is.

Now, if the javascript strings allowed placeholders, similar to how the
template strings do, the above could be written as:

_("Are you sure you want to delete the %s attached
items?").format(count)

This would make translation much easier.

Attached patch adds a Javascript string formatter, and changes all the
concatenated translatable JS strings used in intranet to use that.

To test:
1) cd misc/translator
2) perl translate update xx-YY
3) grep ^msgid po/xx-YY-i-staff-t-prog-v-3006000.po | sort | uniq >
xx-YY-pre
4) apply patch
5) perl translate update xx-YY
6) grep ^msgid po/xx-YY-i-staff-t-prog-v-3006000.po | sort | uniq >
xx-YY-post
7) compare the files: diff -Nurd xx-YY-pre xx-yy-post | less
   should show the javascript strings that changed.
8) Test the UIs where the formatted js strings are used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I tested *most* of the changed files. There were some instances where it
wasn't clear to me how to trigger the warnings which were modified,
especially tags/review.tt, admin/manage-marc-import.tt, and holidays.tt.
Everything I was able to test worked correctly.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Works nicely, no regressions found. Thx!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11227: remove some JavaScript from staff PO files

This patch rewrites authorities_js.inc so translate
script will process it correctly. To do that I added
<script></script> at the file

To test:
1) Update po files for your preffered language

2) Check occurrence of mergeAuth on staff PO file
or try
egrep -n  "Merging with authority: |Cancel merge"
strings appear in a JS func

3) Apply the patch

4) Update translations again, check again, old
strings now begin with #~ (obsoleted) and there
are new entries for the messages

5) Check functionality provided by script

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a translation difficulty.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11769 - Use validation plugin when creating new MARC framework

The page for adding a new MARC framework includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> New framework. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing framework should also work correctly.

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11769: (follow-up) style required fields

This follow up adds the correct "required" style to the required form
fields as well as the "required" text after each required field.

To test, apply all patches and go to Administration -> MARC
bibliographic framework -> New framework. The framework code and
description fields should show that they are required.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described and feels a million times better.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template changes only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>