Both sides previous revisionPrevious revision | |
i18n:problem_children [2022/02/10 13:34] – external edit 127.0.0.1 | i18n:problem_children [2025/08/02 18:08] (current) – Removing outdated XUL client information; adding Launchpad links sleary |
---|
======Internationalization challenges====== | ======Internationalization challenges====== |
| |
| See [[https://bugs.launchpad.net/evergreen/+bugs?field.tag=i18n|the i18n tag on Launchpad]] for open bugs related to internationalization and localization. |
| |
=====Unfriendly Forms==== | =====Unfriendly Forms==== |
/xul/server/admin/closed_dates.xhtml includes forms designed as "fill in the blank" English sentences, which won't translate well. In the following code, the ''<b name='blah'>'' tags are replaced by Javascript calendar widgets and a text entry field:<code html> | |
<tr id='cd_row'> | |
<td align='left'> | |
From | |
<b name='start_date'/> at <b name='start_time'/> | |
<span> through </span> | |
<b name='end_date'/> at <b name='end_time'/> | |
</td> | |
</code> | |
| |
=====MARC editor tooltips===== | A few forms are designed as "fill in the blank" English sentences, which won't translate well. |
There is a giant file of tooltips for the MARC editor that has been generated from the Library of Congress electronic MARC21 documentation. Where translated versions of the MARC21 standard are available, we will have to create scripts to parse and build the equivalent tooltip translations. Depending on the license of the translated work, the tooltip translations may not be able to be distributed as part of Evergreen and may have to be built by each Evergreen site instead (unless an Evergreen vendor negotiates a redistribution license with the copyright owner): | |
| See [[https://bugs.launchpad.net/evergreen/+bug/1178557|#1178557 Short translatable strings need context]] |
| |
| =====MARC editor suggestions===== |
| There is a giant file of field labels for the MARC editor that has been generated from the Library of Congress electronic MARC21 documentation. Where translated versions of the MARC21 standard are available, we will have to create scripts to parse and build the equivalent translations. Depending on the license of the translated work, the translations may not be able to be distributed as part of Evergreen and may have to be built by each Evergreen site instead (unless an Evergreen vendor negotiates a redistribution license with the copyright owner): |
| |
* [[http://www.loc.gov/marc/translations.html|List of MARC translations]] | * [[http://www.loc.gov/marc/translations.html|List of MARC translations]] |
| |
=====Calendar widgets===== | =====Calendar widgets===== |
Currently we're hardcoding locales for calendar widgets in pages like ''Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml'': | |
<code html> | |
<script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script> | |
<script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-en.js"></script> | |
<script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script> | |
</code> | |
''jscalendar'' does offer versions of calendars for many popular locales. One approach would be to replace the locale with a server-side include of the locale environment variable, and create symbolic links to the full locale rather than just the two-character ''en'': | |
<code bash> | |
cd /openils/var/web/opac/common/js/jscalendar/lang | |
ln -sf calendar-en.js calendar-en-US.js | |
</code> | |
<code html> | |
<script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script> | |
<script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-<!--#echo var='locale'-->.js"></script> | |
<script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script> | |
</code> | |
Alternately, we could consider using the (arguably simpler) Dojo date-picker widget instead. Here's a simple example adapted from the Book of Dojo (albeit actually working in Firefox): | |
<code html> | |
<?xml version='1.0' encoding='UTF-8'?> | |
| |
<!DOCTYPE html PUBLIC | See [[https://bugs.launchpad.net/evergreen/+bug/2114944|#2114944 OPAC datepicker translations]] |
"-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ | |
<!--#include virtual="/opac/locale/${locale}/lang.dtd"--> | |
]> | |
| |
<html xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<title>Textarea Demo</title> | |
<style type='text/css'> | |
@import url('/opac/common/dojo/1.0/dijit/themes/tundra/tundra.css'); | |
@import url('/opac/common/dojo/1.0/dojo/resources/dojo.css'); | |
</style> | |
<script type='text/javascript' src='/opac/common/dojo/1.0/dojo/dojo.js.uncompressed.js' | |
djConfig='parseOnLoad: true'></script> | |
<script type='text/javascript'> | |
dojo.require('dojo.parser'); | |
dojo.require('dijit.form.DateTextBox'); | |
</script> | |
</head> | |
<body class='tundra'> | |
<input type='text' name='date1' value='2005-12-30' class='tundra' | |
dojoType='dijit.form.DateTextBox' | |
required='true' /> | |
</body> | |
</html> | |
</code> | |
| |
=====Logic relying on parsing English text===== | =====Logic relying on parsing English text===== |