Repository navigation
Added ability for JSON/XLIFF conversion and Push/Pull from Transifex - #23281
Conversation
…on->xlf->json parsing.
…on->xlf->json parsing.
…on->xlf->json parsing.
…on->xlf->json parsing.
|
Michel Kaporin (@michelkaporin), thanks for your PR! By analyzing the history of the files in this pull request, we identified Erich Gamma (@egamma) and alexandrudima to be potential reviewers. |
|
Michel Kaporin (@michelkaporin), |
| 'trk': 'tr' | ||
| }; | ||
|
|
||
| const iso639_2_to_3: Map<string> = { |
There was a problem hiding this comment.
We might want to consider using 2 letter id in the future. The reason why we have this mapping is that MS internally uses 3. If all is public we could switch over to 2.
| promise = createResource(project, slug, file, apiHostname, credentials); | ||
| } | ||
| updateCreatePromises.push(promise); | ||
| }).catch((reason) => { |
There was a problem hiding this comment.
I am not a gulp expert either but I think this simply logs something to the console but the gulp stream says in tact and the build will look like it passed. We have to ensure that in the cause of exceptions talking to Transifex this can be observed as a failing build from the outside.
There was a problem hiding this comment.
I've made the pipeline to fail whenever we have any parsing or Transifex push/pull errors.
| 'ita': 'CP1252' | ||
| }; | ||
|
|
||
| export function createIslFile(base: string, originalFilePath: string, messages: Map<string>, language: string): File { |
There was a problem hiding this comment.
Did you consider that for the ISL we only need to push ch* and kor. For all other languages we have translations. Or is this not possible since languages are defined by a Transifex project. If so we might want to consider not pushing the Default.isl to Transifex
There was a problem hiding this comment.
We should consider a vscode-setup project to control better to which languages we need the Default.isl translated.
There was a problem hiding this comment.
vscode-setup project was created on Transifex, the code amended correspondingly, so that we now pull only ch* and kor languages.
…failures in parsing or in communication with Transifex.
…oduced language parameter for pulling XLFs.
|
It's ok for me to merge. |
Wrote a JSON->XLIFF parser tackling #22092, and implemented XLIFFs push/pull of translations using Transifex API for #22070