Open rob51i03 opened 2 years ago
Could you share the script you use to call the ImportProperties
method? Most likely, it is a matter of how the csv data is parsed.
Here's the code I used:
var tsvFilePath = @"c:\Temp\Translations.txt";
// Read the tsv
var tsv = ReadFile(tsvFilePath);
// Import the translations into the model
ImportProperties(tsv);
Here's a small extract of the tab separated file used as the source for the import. Translations.txt Rows 12 and 15 have commas in the French translations; these are truncated at the comma upon import. Other translations import as expected.
Could I get a status for this? Currently I am working around this by copying and pasting translations in via the UI but it's not ideal. Thanks!
We were not able to reproduce this issue. The following simple script example shows that the ImportProperties
and ExportProperties
do not truncate the names (assuming the selection contains a one or more measures having commas in their translated names):
var tsv = ExportProperties(Selected.Measures, "Name,TranslatedNames");
tsv.Output();
ImportProperties(tsv);
Please make sure that your .txt file conforms to the format used by ExportProperties
(no quotes, tabs as separators)
When importing metadata translations from a UTF-8 tab separated file using the ImportProperties scripting command, any translations containing commas are truncated at the comma.
This occurs whether or not a text qualifier is used around the values in the text file , such as a quotation symbol.