Skip to content

Commit

Permalink
fix(xlf/translations): using appropriate indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
moki committed Nov 27, 2023
1 parent 0cbb0ed commit 7e4c07a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xlf/parser/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('validates parameters', () => {
it('works with valid parameters', () => {
const units = [
{target: 'Предложение о чем-то', id: 1},
{target: 'Фрагмент Текста', id: 1},
{target: 'Фрагмент Текста', id: 2},
];
const xlf = generateXLF(units);
parseTranslations({xlf});
Expand Down
2 changes: 1 addition & 1 deletion src/xlf/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getTranslations(parameters: TranslationsParameters) {

rendered += renderer.render(tokens);

translations.set(String(i), rendered);
translations.set(String(i + 1), rendered);
rendered = '';
}

Expand Down

0 comments on commit 7e4c07a

Please sign in to comment.