translations¶
translations ¶
TranslationDictionaryPaths dataclass ¶
Paths to the static two-column translation-dictionary spreadsheets build needs, one per A3Field that requires an A3→iMarina translation.
Source code in source/src/imarina_load_researchers/core/translations.py
to_a3_field_map ¶
Maps each translated A3Field to its dictionary spreadsheet's path.
Returns:
| Type | Description |
|---|---|
dict[A3Field, Path] | dict[A3Field, Path]: The |
Source code in source/src/imarina_load_researchers/core/translations.py
build_translations ¶
Loads every A3→iMarina translation dictionary into one Translator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paths | TranslationDictionaryPaths | Paths to the dictionary spreadsheets to load. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Translator | Translator | The |
Source code in source/src/imarina_load_researchers/core/translations.py
build_translator ¶
Loads a two-column dictionary spreadsheet into a {raw: translated} dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | Path | Path to the two-column dictionary spreadsheet. | required |
skiprows | int | Number of leading rows to skip (e.g. a header row). | 0 |
Returns:
| Type | Description |
|---|---|
dict[str, str] | dict[str, str]: The first column mapped to the second, as a dict. |