-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/translation-using-properties
- Loading branch information
Showing
37 changed files
with
5,422 additions
and
23,585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Translation Files in ABAP File Formats | ||
|
||
### File Format | ||
The file format for translation is `properties` and consists of key value pairs, e.g. | ||
```PROPERTIES | ||
key=value | ||
... | ||
``` | ||
The `key` refers to the text that is translated (source language), whereas `value` is the actual translated text. | ||
A key follows the convenction of [JSONPath](https://goessner.net/articles/JsonPath/) when refering to data in JSON files. | ||
|
||
### File Name | ||
|
||
The translation of an ABAP object are stored in file named | ||
`<object_name>.<object_type>.i18n.<language>.properties` | ||
|
||
### Example | ||
Assume that the ABAP object is represented by | ||
```JSON | ||
{ | ||
"formatVersion": "1", | ||
"header": { | ||
"description": "Hello", | ||
"originalLanguage": "en" | ||
}, | ||
"descriptions": { | ||
"methods": [ | ||
{ | ||
"name": "METHOD_ONE", | ||
"description": "One", | ||
}, | ||
{ | ||
"name": "METHOD_TWO", | ||
"description": "Two", | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
with the translation relevant texts being all descriptions. | ||
Then the translation file (for french) is | ||
```PROPERTIES | ||
$.header.description=Bonjour | ||
$.descriptions.methods[?(@.name=='METHOD_ONE')].description=Un | ||
$.descriptions.methods[?(@.name=='METHOD_TWO')].description=Deux | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# SAJC File Format | ||
|
||
File | Cardinality | Definition | Schema | Example | ||
:--- | :--- | :--- | :--- | :--- | ||
:--- | :--- | :--- | :--- | :--- | ||
`<name>.sajc.json` | 1 | [`zif_aff_sajc_v1.intf.abap`](./type/zif_aff_sajc_v1.intf.abap) | [`sajc-v1.json`](./sajc-v1.json) | [`z_aff_example_sajc.sajc.json`](./examples/z_aff_example_sajc.sajc.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.