Closed BDOlode closed 6 months ago
It's probably a better idea to use friendly names for your tables/columns/measures/hierarchies. Then you won't encounter this problem. It appears the translation tool doesn't understand word separators and I'm not exactly sure if that is a feature in the translator. In the meantime, I could have it just replace underscores with spaces - although there may be other types of word separators.
Or potentially an extra function argument for characters to be excluded?
Additionally, do you intend to open source the code, such that others can make adaptations specific to their use cases?
Ah true, that's a good, simple option. With regard to open sourcing we'll see. If you have any ideas/requests feel free to submit them here (as you're already doing).
In the next version you will be able to specify a string of characters which will be excluded (each of these characters will be replaced by a space. So if you had a table name of 'Dim_Account - Sales' it would get translated as 'Dim Account Sales' (in the example below).
fct.translate_semantic_model(dataset = '', languages = ['it-IT', 'fr-FR'], exclude_characters = '_-', workspace = None)
See 0.4.1
The translation function lacks support for names seperated by underscores, is it possible to define word seperators ?
f.e. below script attempting translation to norwegian: Translating Names... Added the 'nb' language Translation 'dim_accounts' set for the 'nb' language on the 'dim_accounts' table. Translation 'account_no_name' set on the 'account_no_name' column within the dim_accounts' table. Translation 'group1_code' set on the 'group1_code' column within the dim_accounts' table.