Skip to content

Commit

Permalink
Build vNext...
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Nov 2, 2020
1 parent ec621b3 commit 094c208
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/resource-translator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ async function translate(endpoint, subscriptionKey, toLocales, translatableText)
headers: {
'Ocp-Apim-Subscription-Key': subscriptionKey,
'Content-type': 'application/json',
'X-ClientTraceId': uuidv4_1.uuid().toString()
'X-ClientTraceId': uuidv4_1.uuid()
},
body: [
JSON.stringify(Object.fromEntries(translatableText.entries()))
Expand Down Expand Up @@ -11585,6 +11585,7 @@ async function initiate() {
const resourceFile = resourceFiles[index];
const resourceXml = await resource_io_1.readFile(resourceFile);
const translatableText = await translator_1.getTranslatableText(resourceXml);
core_1.info(`Translatable text:\n ${translatableText}`);
if (translatableText) {
const toLocales = Object.keys(availableTranslations.translation);
const result = await api_1.translate(inputOptions.endpoint, inputOptions.subscriptionKey, toLocales, translatableText);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ievangelist/resource-translator",
"version": "0.6.0",
"version": "0.7.0",
"preview": true,
"keywords": [
"github",
Expand Down
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function translate(
headers: {
'Ocp-Apim-Subscription-Key': subscriptionKey,
'Content-type': 'application/json',
'X-ClientTraceId': uuid().toString()
'X-ClientTraceId': uuid()
},
body: [
JSON.stringify(
Expand Down
3 changes: 3 additions & 0 deletions src/resource-translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export async function initiate() {
const resourceFile = resourceFiles[index];
const resourceXml = await readFile(resourceFile);
const translatableText = await getTranslatableText(resourceXml);

info(`Translatable text:\n ${translatableText}`);

if (translatableText) {
const toLocales =
Object.keys(availableTranslations.translation);
Expand Down

0 comments on commit 094c208

Please sign in to comment.