Skip to content

Commit

Permalink
change delimeter
Browse files Browse the repository at this point in the history
  • Loading branch information
while1618 committed Apr 28, 2022
1 parent 145a1a0 commit 5514071
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<p align="center">
<a href="https://www.npmjs.com/package/i18n-auto-translation" alt="NPM Version">
<img src="https://img.shields.io/badge/npm-v1.1.9-blue" />
<img src="https://img.shields.io/badge/npm-v1.1.10-blue" />
</a>
<a href="LICENSE" alt="License">
<img src="https://img.shields.io/github/license/while1618/i18n-auto-translation" />
Expand Down
4 changes: 2 additions & 2 deletions src/translate/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { argv } from './cli';
import { JSONObj } from './payload';

export abstract class Translate {
protected static readonly sentenceDelimiter: string = '|*|';
protected static readonly sentenceDelimiter: string = ' {|} ';

public translate = (): void => {
if (argv.filePath && argv.dirPath)
Expand Down Expand Up @@ -148,7 +148,7 @@ export abstract class Translate {
Object.keys(json).forEach((key: string) => {
if (typeof json[key] === 'object') addTranslations(json[key] as JSONObj);
// eslint-disable-next-line no-param-reassign
else json[key] = translations[index++];
else json[key] = translations[index++]?.trimStart();
});
})(translatedObject);

Expand Down

0 comments on commit 5514071

Please sign in to comment.