-
Notifications
You must be signed in to change notification settings - Fork 5
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
Doesn't work if file is not named after locale #2
Comments
Can you provide user.yml file? |
Here it is: ---
en:
user:
cancel_account: cancel account
mailer:
confirmation_instructions:
confirm_account: Confirm account
message: Message
welcome: Welcome
sign_in: Sign in
sign_out: Logout
sign_up: Sign up
user: User |
i18n-translators-tools is designed to work with directory structure and locales are determined from the file names, so it expects something like user/en.yml. Unfortunately I don't have much time to improve this tool to accept arbitrary conversions right now. If you provide reasonable patch that will keep compatibility I'm going to accept it. |
Can you elaborate on why it needs the file name at all? I mean, the first key in all of these files is the locale... |
Not all types are having locales information within. e.g java properties files does not have, so I needed to keep the information somewhere. If the locale information is in the file name you can convert properties to yaml successfully. |
Ah, I see. Is there a way to tell Something like |
I'm leaving this open, so I'll get back in to this in the future. For now you have to rename the file to en.yml and after conversion rename the po file back to user.po. Sorry for the inconvenience. |
Alright, I'll see if I can find some time to make a PR. Thanks for the infos. |
Hello,
i18n-translate en.yml en.po
worksi18n-translate user.yml user.po
doesn't workAny idea why?
The text was updated successfully, but these errors were encountered: