newdevs:i18n
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:i18n [2023/09/15 18:13] – tmccanna | newdevs:i18n [2024/01/26 15:24] (current) – [Marking Up Evergreen (Angular TypeScript Pages)] tmccanna | ||
---|---|---|---|
Line 8: | Line 8: | ||
==== 1. Install Translation Files ==== | ==== 1. Install Translation Files ==== | ||
- | Prior to install: | + | **Prerequisite:** |
- | As root: | + | As root, install a translation tool: |
- Refresh local package cache: apt update | - Refresh local package cache: apt update | ||
- Navigate to / | - Navigate to / | ||
- Install the translator (replace " | - Install the translator (replace " | ||
+ | |||
+ | **Prior to installing Evergreen: | ||
As opensrf, navigate to Evergreen/ | As opensrf, navigate to Evergreen/ | ||
Line 21: | Line 23: | ||
- make LOCALE=cs-CZ install //(where cs-CZ is the language you are configuring)// | - make LOCALE=cs-CZ install //(where cs-CZ is the language you are configuring)// | ||
- | Install Evergreen. | + | Repeat steps 2-4 for each additional language. |
+ | |||
+ | **Copy Files** | ||
At this point, you should have PO files under: | At this point, you should have PO files under: | ||
- | * /openils/var/ | + | * /Evergreen/Open-ILS/ |
- | * /openils/var/ | + | * /Evergreen/Open-ILS/ |
+ | |||
+ | Copy each of these folders to the corresponding location on your server. | ||
+ | * cp -r / | ||
+ | * cp -r / | ||
==== 2. Configure the Evergreen Database (if needed) ==== | ==== 2. Configure the Evergreen Database (if needed) ==== | ||
Line 46: | Line 54: | ||
VALUES (' | VALUES (' | ||
- | Add the generated seed data if it was not already installed: | + | Add the generated seed data if it was not already installed. Navigate to / |
- | < | + | < |
==== 3. Modify eg_vhost.conf ==== | ==== 3. Modify eg_vhost.conf ==== | ||
+ | - Switch to root | ||
- File location: etc/ | - File location: etc/ | ||
- | - Look for the " | + | - Look for the " |
- Uncomment or add lines for the new languages you are adding: < | - Uncomment or add lines for the new languages you are adding: < | ||
PerlAddVar OILSWebLocale "/ | PerlAddVar OILSWebLocale "/ | ||
Line 64: | Line 73: | ||
The newer Angular administration interfaces provide a button to add translations (for example, the MARC Coded Value Map controls the Audience dropdown fields in the OPAC advanced search), but you will need to edit a file in order to enable it for each language. | The newer Angular administration interfaces provide a button to add translations (for example, the MARC Coded Value Map controls the Audience dropdown fields in the OPAC advanced search), but you will need to edit a file in order to enable it for each language. | ||
+ | - Switch to opensrf user | ||
- Edit Open-ILS/ | - Edit Open-ILS/ | ||
- | - Modify the locales array (eg, locales: [' | + | - Modify the locales array (eg, locales: [' |
- Recompile Angular: Go to the Open-ILS/ | - Recompile Angular: Go to the Open-ILS/ | ||
| | ||
- | ===== Marking Up Evergreen (Angular Pages) ===== | + | ===== Marking Up Evergreen (Angular |
Most strings only require the addition of " | Most strings only require the addition of " | ||
Line 85: | Line 95: | ||
* [[https:// | * [[https:// | ||
+ | ===== Marking Up Evergreen (Angular TypeScript Pages) ===== | ||
+ | |||
+ | When creating a message in TypeScript, use the $localize tag handler with backticks around the text. | ||
+ | |||
+ | Example: | ||
+ | < | ||
+ | |||
+ | Example: | ||
+ | < | ||
===== Marking Up Evergreen (Template Toolkit Pages) ===== | ===== Marking Up Evergreen (Template Toolkit Pages) ===== | ||
Line 93: | Line 112: | ||
===== Translating Strings in Launchpad ===== | ===== Translating Strings in Launchpad ===== | ||
- | Evergreen translation files are stored in Launchpad. | + | Evergreen translation files are stored in Launchpad. They are downloaded and brought into Evergreen as PO files. |
* [[https:// | * [[https:// | ||
- | Evergreen manages translation files through | + | You can add or update translations directly in Launchpad one string at a time or edit them locally with POEditor |
* [[https:// | * [[https:// | ||
Line 112: | Line 131: | ||
* [[evergreen-admin: | * [[evergreen-admin: | ||
* [[: | * [[: | ||
+ | * Presentation: | ||
- | ===== More Things to add to this page: ===== | ||
- | |||
- | * Links to Evergreen Conference session recordings about internationalization | ||
- | * Info from slides at https:// | ||
- | WIP: | ||
- | Translations are managed in [[https:// | ||
- | - Go to https:// | ||
- | - Click on the "View All Languages" | ||
- | - Select tpac (which contains the translated strings for the OPAC) and then choose the option to Download Translation in PO format. It will be mailed to you and may take an hour or more to arrive. | ||
- | - Go back to webstaff (which contains the translated strings for the staff client) and request a download of that PO file as well. | ||
- | When the files arrive: | ||
- | - Change the name of the PO files to match the language code (e.g., cs-CZ.po for Czech or es-ES.po for Spanish). | ||
- | - Save the tpac download to: / | ||
- | - Save the webstaff download to: / |
newdevs/i18n.1694816027.txt.gz · Last modified: 2023/09/15 18:13 by tmccanna