Bug 8573 - Translation difficult in picture-upload.tt due to nested sentence in if...
authorMarc Veron <veron@veron.ch>
Fri, 10 Aug 2012 04:20:55 +0000 (06:20 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 31 Aug 2012 20:48:40 +0000 (22:48 +0200)
Text could not be correctly translated due to poor parsing of nested sentences in Pootle.

*Sentences de-nested to have whole sentence in each if /elsif branch
*Cleaned up <li></li> handling: moved closing </li> outside the for each loop to prevent orphaned closing </li>s.
*Changed indentation for better readibility
*Changed WARNING to ERROR because it is an *Error* during upload.
*Wording simplified (for translation).
*In one case added hint to refer to online help (size).

This way text should be easier to be translated in Pootle.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt

index 3520048..51a78c5 100644 (file)
                   <li>[% TOTAL %] directories scanned.</li>
                     <li>[% HANDLED %] directories processed.</li>
                 </ul>
+
                 [% FOREACH COUNT IN COUNTS %]
-                   <ul class="data">
+                    <ul class="data">
                         [% IF ( COUNT.TCOUNTS ) %]<li>[% COUNT.TCOUNTS %] image(s) moved into the database:</li>[% END %]
-                        [% FOREACH filename IN COUNT.filenames %]
-                            <li>[% filename.source %] - Cardnumber: [% filename.cardnumber %]
-                                    [% IF ( filename.filerrors ) %]<br /> <b>WARNING:</b> This image <i>not</i> imported because 
+                            [% FOREACH filename IN COUNT.filenames %]
+                                <li>[% filename.source %] - Cardnumber: [% filename.cardnumber %]
+                                [% IF ( filename.filerrors ) %]
                                     [% FOREACH filerror IN filename.filerrors %]
-                                        [% IF ( filerror.DBERR ) %]the database returned an error. Please refer to the error log for more details.</li>
-                                        [% ELSIF ( filerror.IMGEXISTS ) %]this patron does not exist in the database.</li>
-                                        [% ELSIF ( filerror.MIMERR ) %]the image format is unrecognized.</li>
-                                        [% ELSIF ( filerror.CORERR ) %]the image file is corrupted.</li>
-                                        [% ELSIF ( filerror.OPNERR ) %]Koha was unable to open the image for reading.</li>
-                                        [% ELSIF ( filerror.OVRSIZ ) %]the image file is too big.</li>
-                                        [% ELSIF ( filerror.CRDFIL ) %]the [% filerror.CRDFIL %] is missing.</li>
-                                        [% ELSE %]of an unknown error. Please refer to the error log for more details.</li>[% END %]
-                                    [% END %]
-                                        [% ELSE %] imported successfully.</li>
+                                        [% IF ( filerror.DBERR ) %]<br /><b>ERROR:</b> Image not imported because the database returned an error. Please refer to the error log for more details.
+                                        [% ELSIF ( filerror.IMGEXISTS ) %]<br /><b>ERROR:</b> Image not imported because this patron does not exist in the database.
+                                        [% ELSIF ( filerror.MIMERR ) %]<br /><b>ERROR:</b> Image not imported because the image format is unrecognized.
+                                        [% ELSIF ( filerror.CORERR ) %]<br /><b>ERROR:</b> Image not imported because the image file is corrupted.
+                                        [% ELSIF ( filerror.OPNERR ) %]<br /><b>ERROR:</b> Image not imported because Koha was unable to open the image for reading.
+                                        [% ELSIF ( filerror.OVRSIZ ) %]<br /><b>ERROR:</b> Image not imported because the image file is too big (see online help for maximum size).
+                                        [% ELSIF ( filerror.CRDFIL ) %]<br /><b>ERROR:</b> Image not imported ([% filerror.CRDFIL %] missing).
+                                        [% ELSE %]<br /><b>ERROR:</b> Image not imported because of an unknown error. Please refer to the error log for more details.
+                                        [% END %]
                                     [% END %]
+                                [% ELSE %] imported successfully.
+                                [% END %]
+                                </li>
                         [% END %]
-                        </ul>
+                    </ul>
                 [% END %]
 
                                </div>