Skip to content

Commit

Permalink
Added option to ignore translatable SVG when converting DITA
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Sep 26, 2024
1 parent c652813 commit dc52cca
Show file tree
Hide file tree
Showing 18 changed files with 2,120 additions and 15,767 deletions.
29 changes: 11 additions & 18 deletions LOCALIZATION.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# OpenXLIFF Filters Localization

Localizing OpenXLIFF Filters requires processing 2 types of files:

1. Java `.properties` files
2. Language files in XML format

## Localization of Java .properties
Localizing OpenXLIFF Filters requires processing Java `.properties` files.

[JavaPM](https://www.maxprograms.com/products/javapm.html) is used to generate XLIFF from `/src` folder.

Expand All @@ -17,21 +12,19 @@ Use a command like this to generate XLIFF:

OpenXLIFF Filters .properties are encoded in UTF-8; translated versions must be generated using `UTF-8` character set.

## Localization of language files
After translating the XLIFF file, use the `mergexliff` command from `JavaPM` like this to merge the translated XLIFF back into the Java `.properties` files and store them in the corresponding subfolders of `/src`:

Two XML files contains the list of languages used by OpenXLIFF Filters. These files are located in `/src/com/maxprograms/languages/` folder.

The XML files that need translations are:
```bash
/path-to-Javapm/mergexliff.sh -src /path-to-OpenXLIFF/src -xliff yourTranslatedXliff.xlf -unaproved -export
```

- languageList.xml
- extendedLanguageList.xml
You can find the XLIFF an TMX files for Spanish in `/i18n` folder.

Use `convert.bat` or `convert.sh` to generate XLIFF from these files:
## Dependencies

```bash
dist/convert.sh -embed -type XMLG -srcLang en -file /path-to-OpenXLIFF/src/com/maxprograms/languages/languageList.xml -xliff /path-to-OpenXLIFF/i18n/languageList.xml.xlf
OpenXLIFF Filters depends on these related projects:

dist/convert.sh -embed -type XMLG -srcLang en -file /path-to-OpenXLIFF/src/com/maxprograms/languages/extendedLanguageList.xml-xliff /path-to-OpenXLIFF/i18n/extendedLanguageList.xml.xlf
```
- [BCP47J](https://github.com/rmraya/BCP47J) for language tags
- [XMLJava](https://github.com/rmraya/XMLJava) for XML parsing

You can find sample XLIFF 2.0 files for .properties and languages in `/i18n` folder.
You may need to localize these projects as well.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ XML and JSON filters are configurable

Version | Comment | Release Date
:------:|---------|:-----------:
3.22.0 | Added option to ignore translatable SVG files when parsing DITA | September 26th, 2024
3.21.0 | Fixed attributes parsing in HTML and improved JSON filter | August 29th, 2024
3.20.0 | Improved region merging for Word documents | March 17th, 2024
3.19.0 | Moved Language Tags handling to [BCP47J](https://github.com/rmraya/BCP47J) | March 7th, 2024
Expand Down
Loading

0 comments on commit dc52cca

Please sign in to comment.