Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different key seperator #36

Open
ghost opened this issue Dec 14, 2021 · 2 comments
Open

different key seperator #36

ghost opened this issue Dec 14, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 14, 2021

how can i choose another seperator for the keys - i have the problem that the default seperator '\' causes a lint error.
Example:

generated in vue component:
<div class="n-view-title">{{ $t('src\components\administration\user\index.title') }}</div>

generated in locals/en.json:
{ "src\\components\\administration\\user\\index": { "title": "New user" } }

this works of course but cause my linter to throw errors.
A seperator like '.' instead of '\' would also work!

How can i change this?

@ghost ghost changed the title key seperator different key seperator Dec 14, 2021
@MurtazinEduard
Copy link

how did you solve this problem?

@ghost
Copy link
Author

ghost commented Jan 10, 2022

i just changed the code for myself:

in the bin.js file:
line 180: var key = await manager.getSuggestedKey(filePath, str.string, usedKeys)
i used the standard replace function to create a . instead of \

this did it for me..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant