-
Notifications
You must be signed in to change notification settings - Fork 40
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
[UX] Installer: Allow using .po translation files from b.org without having to rename them. #3674
Comments
@klonos I recall you had made the PR for the respective d.org files issue. Are you up to make the PR for b.org files as well? |
I've added the label
After fixing this issue, we can remove that step from the instructions. |
@olafgrabienski it's a pretty simple PR if you want to take a stab at it:
See https://github.com/backdrop/backdrop/pull/1649/files |
...adding tag for https://backdropcms.org/news/backdrop-contribution-day-april-20-2019 |
@herbdool Thanks, very helpful! I'm not familiar with such patterns. Will try to take a stab at it. (Btw, what does the |
Correct, it means a number one or more times. There are handy websites like this https://regex101.com/ where you can play around with regular expressions to see what they mean and if they'll allow a sample file name. |
@olafgrabienski if you type See https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285 |
...or what @herbdool said 😄 |
...or could use |
Hm, not exactly ... At least according to https://regex101.com, the expressions treat the dot before the language code differently: |
…m b.org without having to rename them Fixes backdrop/backdrop-issues#3674.
I suggest milestone 1.12.7, as #3560 which is related. |
Tested the PR locally: put To reproduce, the language files are available on https://localize.backdropcms.org/translate/downloads. |
Looks great! Thanks @olafgrabienski! |
Thanks for the review! What do you think about the milestone? |
I don't know if I can add a milestone but I think it's safe to make it 1.12.7. |
Reminder @olafgrabienski : In https://backdropcms.org/installing-in-other-languages we're currently mentioning that people have to rename a language file downloaded from b.org. When this PR becomes part of a new Backdrop release, we should remove that step from the instructions. |
@herbdool yes, if you agree you can add it :) nicely done! |
Looks good. I see that the .po files you download from https://localize.backdropcms.org/ match this file name structure, but it raised my eyebrows that the name of the downloaded file was "backdropcms" instead of just "backdrop". Inside our own codebase, we always use the shortened version without "cms" for function names, settings, etc. If we can change the string indicator on the localize site, we should adjust this code to accept just "backdrop" as well. Perhaps we could go ahead and make that change (allowing "backdrop" with no "cms") so we can later adjust the localization server whenever we want? |
Suggestion made at https://github.com/backdrop/backdrop/pull/2583/files#r277144890 |
LGTM 👍 |
I've applied @quicksketch's suggestion. Looks good to me, but one test in backdrop/backdrop#2583 failed:
|
I think that's a random error. Looks good! |
…without having to rename them. By @olafgrabienski, @herbdool, @klonos, and @quicksketch.
…without having to rename them. By @olafgrabienski, @herbdool, @klonos, and @quicksketch.
Thanks @olafgrabienski, @herbdool, and @klonos! Merged backdrop/backdrop#2583 into 1.x and 1.12.x. |
|
The translation files available from https://localize.backdropcms.org/translate/downloads are in the format
backdropcms-VERSION.LANGCODE.po
. As in #2345 for files from d.org, we should be accounting for these filenames when scanning for language files during installation, instead of expecting people to rename files to match the patterninstall.LANGCODE.po
.Steps To Reproduce
.po
file, e.g.backdropcms-1.12.2.es.po
, inside the directoryfiles/translations
of your Backdrop directory.Actual behavior
You can't choose another language but English.
Expected behavior
You can choose your language, e.g. Spanish.
Additional information
The issue had already been fixed for Drupal files before we started to work with our own language server.
PR by @olafgrabienski: backdrop/backdrop#2583
The text was updated successfully, but these errors were encountered: