Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Editor/PhraseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public async void UpdateProjectsList(List<Project> projects)
} while (currentBatch.Count == 100); // Continue if a full batch is returned
}

public async void UploadFile(string path, string projectID, string localeID, string localeCode, bool autoTranslate, string tag)
public async void UploadFile(string path, string projectID, string localeID, string localeName, bool autoTranslate, string tag)
{
string url = string.Format("projects/{0}/uploads", projectID);
NameValueCollection nvc = new NameValueCollection
Expand All @@ -182,7 +182,7 @@ public async void UploadFile(string path, string projectID, string localeID, str
{ "file_format", "csv" },
{ "update_descriptions", "true" },
{ "update_translations", "true" },
{ $"locale_mapping[{localeCode}]", "4" },
{ $"locale_mapping[{localeName}]", "4" },
{ "format_options[key_index]", "1" },
{ "format_options[comment_index]", "2" },
{ "format_options[max_characters_allowed_column]", "3" },
Expand Down
4 changes: 2 additions & 2 deletions Editor/PhraseProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public IEnumerator PushAll(List<StringTableCollection> collections)
string keyPrefix = phraseExtension.m_identifierType == TableIdentifierType.KeyPrefix ? phraseExtension.m_identifier : null;
Csv.Export(stream, collection, ColumnMappings(locale, keyPrefix));
}
Client.UploadFile(path, m_selectedProjectId, locale.id, locale.code, false, tag);
Client.UploadFile(path, m_selectedProjectId, locale.id, locale.name, false, tag);
if (File.Exists(path)) File.Delete(path);
}
}
Expand All @@ -299,7 +299,7 @@ private List<CsvColumns> ColumnMappings(Locale locale, string keyPrefix)
},
new LocaleColumns {
LocaleIdentifier = locale.code,
FieldName = locale.code
FieldName = locale.name
},
};
}
Expand Down