User Tools

Site Tools


newdevs:i18n

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
newdevs:i18n [2023/11/21 13:34] – [3. Modify eg_vhost.conf] tmccannanewdevs:i18n [2024/01/26 15:24] (current) – [Marking Up Evergreen (Angular TypeScript Pages)] tmccanna
Line 59: Line 59:
 ==== 3. Modify eg_vhost.conf ==== ==== 3. Modify eg_vhost.conf ====
  
 +  - Switch to root
   - File location: etc/apache2/eg_vhost.conf    - File location: etc/apache2/eg_vhost.conf 
   - Look for the "Locale messages files" section around line 700   - Look for the "Locale messages files" section around line 700
Line 72: 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/src/eg2/src/environments/environment.prod.ts   - Edit Open-ILS/src/eg2/src/environments/environment.prod.ts
   - Modify the locales array (eg, locales: ['en-US','cs-CZ','es-ES']   - Modify the locales array (eg, locales: ['en-US','cs-CZ','es-ES']
   - Recompile Angular: Go to the Open-ILS/src/eg2 folder and run: ng build   - Recompile Angular: Go to the Open-ILS/src/eg2 folder and run: ng build
          
-===== Marking Up Evergreen (Angular Pages) =====+===== Marking Up Evergreen (Angular HTML Template Pages) =====
  
 Most strings only require the addition of "i18n" to the innermost tag surrounding text:  Most strings only require the addition of "i18n" to the innermost tag surrounding text: 
Line 93: Line 95:
   * [[https://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=a581623b2cfd56d072a1c3b00ad138811a448d50|LP#1951307: Contextual confirm dialog button text]]   * [[https://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=a581623b2cfd56d072a1c3b00ad138811a448d50|LP#1951307: Contextual confirm dialog button text]]
  
 +===== Marking Up Evergreen (Angular TypeScript Pages) =====
 +
 +When creating a message in TypeScript, use the $localize tag handler with backticks around the text. 
 +
 +Example: 
 +<code>warning_msg = $localize`Watch out!`;</code>
 +
 +Example:
 +<code>warning_msg = $localize`There is a problem with ${this.barcode}`;</code>
  
 ===== Marking Up Evergreen (Template Toolkit Pages) ===== ===== Marking Up Evergreen (Template Toolkit Pages) =====
newdevs/i18n.1700591686.txt.gz · Last modified: 2023/11/21 13:34 by tmccanna

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.