Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Keys with dots in them prevents files from saving #32

Open
Jasius opened this issue Sep 26, 2017 · 7 comments
Open

Keys with dots in them prevents files from saving #32

Jasius opened this issue Sep 26, 2017 · 7 comments

Comments

@Jasius
Copy link

Jasius commented Sep 26, 2017

Hey,

So basically if there's anything like

"whatever": { "please wait...": "Please Wait..." }

The file doesn't want to save, I understand that such keys shouldn't be made in the first place(they were made by some other dev not me) but it would be good if the app threw an error or something in such cases rather than refusing to save, took me a few minutes to figure this bug out.

@nobbih
Copy link

nobbih commented Nov 19, 2017

Same behaviour in java property files ? If yes, that would be a serious bug

@Jasius
Copy link
Author

Jasius commented Nov 19, 2017

Just tried with .json

@jcbvm
Copy link
Owner

jcbvm commented Nov 20, 2017

Dots in translation keys are preserved, this is by design. The dots are used to create a tree structure of the keys. so like a.b means b is a sub key of a. In the future there might be a setting to change this separator.

@Jasius
Copy link
Author

Jasius commented Nov 20, 2017

In the future there might be a setting to change this separator.

That would be good because right now I have to exclude country manually before passing translations to translator device.

Country in question

"Virgin Islands, U.S.": "Virgin Islands, U.S.",

@nobbih
Copy link

nobbih commented Nov 20, 2017

From my point of view using a key like "Virgin Islands, U.S." makes absolutely no sense. So I would propose to support the translation of dots to tree structure in the key and ignore the dots in the property.
Java property files are handling that very well - and have been around for a long time. Why not keep that behaviour in the json representation also ?

@nobbih
Copy link

nobbih commented Nov 20, 2017

@Jasius I do not understand why you need somethink like that
"whatever": { "please wait...": "Please Wait..." }
in a I8N property file ?
Sticking to keeping the key/message pairs in separated files per language is the best option in my view and has been around a long time successfully

@Jasius
Copy link
Author

Jasius commented Nov 20, 2017

I don't need it and I wouldn't do that if i could, these keys aremade in the back end and higher up refused to change, remove it.

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

No branches or pull requests

3 participants