Following up on #1260586: Consolidate .po file import to one directory, the installer now expects to find files with names like install.$langcode.po in your file system if you want the Drupal installation to proceed in a language other than English.

However, the on-screen instructions say nothing about files needing to follow that install.$langcode.po pattern; they just direct me to localize.drupal.org, where the files I can download don't match that pattern and therefore aren't recognized by the installer.

This needs to get resolved one way or another - not sure if the issue is with localize.drupal.org not being ready for D8 or something we need to change in the on-screen instructions or both.

Files: 
CommentFileSizeAuthor
#33 1392208-install_english-31.patch2.12 KBsteinmb
PASSED: [[SimpleTest]]: [MySQL] 40,567 pass(es). View
#31 1392208-install_english-30.patch2.15 KBsteinmb
PASSED: [[SimpleTest]]: [MySQL] 40,564 pass(es). View
#29 1392208-install_english-29.patch2.59 KBsteinmb
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/includes/install.core.inc. View
#25 1392208-install_english-24.patch2.8 KBArtusamak
PASSED: [[SimpleTest]]: [MySQL] 40,349 pass(es). View
#24 1392208-install_english-24.patch2.8 KBArtusamak
PASSED: [[SimpleTest]]: [MySQL] 40,361 pass(es). View
#22 language_selector_without_translation_files.png37.11 KBLoMo
#22 odd_language_selector-with-extra-language_files.png33.97 KBLoMo
#18 1392208-fix-po-pattern.patch3.28 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 40,117 pass(es). View
#14 1392208-po-file-detection-12.patch2.71 KBpenyaskito
FAILED: [[SimpleTest]]: [MySQL] 40,114 pass(es), 3 fail(s), and 0 exception(s). View
#12 installer-po-path.patch1.85 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 40,071 pass(es), 3 fail(s), and 0 exception(s). View
#11 1733766-localized-instructions-0.patch934 bytesGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 40,076 pass(es). View

Comments

David_Rothstein’s picture

Gábor Hojtsy’s picture

Yes, this functionality has a component of development on localize.drupal.org to introduce the public download of these files. Currently, these files are only possible to generate on the admin side of localize.drupal.org (and are committed to drupal.org git to be packaged with the l10n_install profile). Distro type projects should get install.po file downloads and the UI for these downloads should display the files. This does need some development on that side and is tracked in #1392330: Add installer .po file downloads for distro type projects.

Until that is done, the best instructions we could provide is to either symlink the core .po file also as installer.$langcode.po for the langcode in question or copy the file under that name. We can get in a quirky temporary install instruction if that looks like a good idea. I thought wordsmithing on interim, temporary solutions is a waste of time.

Gábor Hojtsy’s picture

Issue tags: +D8MI

Tagging for D8MI.

catch’s picture

Could we possibly add a change notice somewhere with the interim instructions, just to have somewhere to point to other than this issue?

I'm tempted to downgrade this and tag it with 'revisit before release' - we should ensure localize.drupal.org has compatible files before 8.0 ships, but I don't think there's much that's actionable in core to either make that happen or work around it if it doesn't.

catch’s picture

Priority: Critical » Normal
Issue tags: +revisit before beta

Tempted enough I'm going to do that for now.

David_Rothstein’s picture

Makes sense as long as "revisit before release" actually gets revisited.... I don't think it did in Drupal 7 :)

A better status might be critical + postponed? Per Gábor's comment above, there is not much point in working on this now. However, we will have to make some change to core for this, since the current instructions are very unlikely to wind up being the correct ones regardless of what else happens in Drupal 8. We just don't know exactly what to change it to yet.

catch’s picture

Heh, I had the same worry, so I opened #1393358: [META-12] Review 'revisit before release candidate' tag.

Critical/postponed might work, not sure whether 'normal' or 'postponed' makes it more or less hidden really (the less hidden the better IMO).

Gábor Hojtsy’s picture

Issue tags: +language-base

Tagging for base language system.

penyaskito’s picture

Issue tags: +sprint

Tagging for the sprint, I hope to see this on D8.

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
934 bytes
PASSED: [[SimpleTest]]: [MySQL] 40,076 pass(es). View

Re-uploading @penyaskito's patch for review.

Gábor Hojtsy’s picture

FileSize
1.85 KB
FAILED: [[SimpleTest]]: [MySQL] 40,071 pass(es), 3 fail(s), and 0 exception(s). View

I think a better short term solution might be to change the install.$langcode.po pattern to drupal-$version.$langcode.po pattern, where we don't check the version at all, just the langcode, so whatever version file we find there, we take that. Something like the attached (not tested). This is still temporary too, but avoids user work while we can just automate this.

Status: Needs review » Needs work

The last submitted patch, installer-po-path.patch, failed testing.

penyaskito’s picture

Status: Needs work » Needs review
FileSize
2.71 KB
FAILED: [[SimpleTest]]: [MySQL] 40,114 pass(es), 3 fail(s), and 0 exception(s). View

The assertions on the test needs to be changed. This is well test-covered btw :)

lazysoundsystem’s picture

Status: Needs review » Needs work

I've just tested this and it's working fine.

lazysoundsystem’s picture

Status: Needs work » Needs review

Unintentional status change from 'needs review' - switching back.

Status: Needs review » Needs work

The last submitted patch, 1392208-po-file-detection-12.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
3.28 KB
PASSED: [[SimpleTest]]: [MySQL] 40,117 pass(es). View

So in the tests, the naming of the files are significant, because we are looking at whether the concerete files were found. Should rename the test installer files as well.

sxnc’s picture

Ran the test locally as well, came back green and worked fine!

sxnc’s picture

Status: Needs review » Reviewed & tested by the community

updating status~

webchick’s picture

Status: Reviewed & tested by the community » Fixed

That sounds like a great fix to me. :)

Committed and pushed to 8.x. Thanks!

LoMo’s picture

There are still some issues in the remit of "Impossible to install Drupal in a non-English language when following the provided instructions":

1) It would be nice to just allow the file to be named (anything optional).langcode.po , i.e de.po or whatever.de.po Currently finding that the drupal-7.15.de.po file I downloaded did not get recognized if renamed to de.po, as has always worked in previous versions of Drupal.

2) In core/profiles/standard/translations, the README.txt file reads:

This directory should be used to place downloaded translations
for installing Drupal core.

Putting a .po file (however it's named) in this location does NOT work.

3) The directions say to put the translation file in the sites/default/files/translations directory, which does not exist. Once created, files named according to the naming pattern (drupal-7.15.de.po) will be recognized there. Ideally, we should not have the core/profiles/standard/translations directory at all and perhaps as an interim solution, at least the README file should direct users to the correct location (sites/default/files/translations).

4) Assuming you have a second language enabled and install in it, the selector for that language is a bit odd:

Before adding a non-English translation file (normal):
Normal language selector

After adding a translation file:
After adding a non-English translation file

5) Finally (and I think I'll report this as a separate issue), if you install in one non-English language and make it your default, if you attempt to access /en/ paths, you may find that some of the interface text is still translated to the default (e.g. German) language.

Artusamak’s picture

Assigned: Unassigned » Artusamak

I'm gonna test that.

Artusamak’s picture

Assigned: Artusamak » Unassigned
Status: Needs work » Needs review
FileSize
2.8 KB
PASSED: [[SimpleTest]]: [MySQL] 40,361 pass(es). View

1/ The attached patch should fix it.
2 & 3/ The documentation hasn't been updated, the installer isn't looking in the installation profiles anymore we should no longer have those directories either the attached patch is removing them.
4/ I agree that the multiselect is weird and the dropdown is a pattern that makes more sense, we were using the size attribute to limit the size of the multiselect in case we had a ton of available languages, i don't think that for most of the users they will have more than 5 items so the dropdown is more usable in that situation.

Please test the patch :)

Artusamak’s picture

FileSize
2.8 KB
PASSED: [[SimpleTest]]: [MySQL] 40,349 pass(es). View

Sorry for the double post.

Boobaa’s picture

Okay, 1-2-3-4 is solved by the patch. But 5 needs to be addressed, too: I did have the same bug that was mentioned in #22, but when I changed to the non-English language I have installed with (Hungarian in my case) I could find English strings appearing every here and there that _are_ included in the .po file with proper translations.

Anyway, I don't know what's the proper step next, thus I don't touch the issue status.

bforchhammer’s picture

Status: Needs review » Needs work

Patch looks good, but I'm not sure about the regex change in install_find_translation_files()... what happens if the user puts other translation files into the same folder? (e.g. for old versions of core, contrib modules etc.).

The issue about translated text on english pages (en/ path) has also come up in #1738330-38: Confusing Language negotiation when accessing / and I also think will need its own issue.

bforchhammer’s picture

Reverting unintentional status change.

steinmb’s picture

FileSize
2.59 KB
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/includes/install.core.inc. View
+++ b/core/includes/install.core.inc
@@ -1211,7 +1211,7 @@ function install_find_translations() {
-  $files = file_scan_directory($directory, '!drupal-\d+\.\d+\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
+  $files = file_scan_directory($directory, '!(drupal-\d+\.\d+\.)?' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));

Reverting this changes then i give false language option during installation if the user put module translation into this folder. Adding more details to INSTALL.txt to make sure the user uses the correct naming schema.

steinmb’s picture

Assigned: Unassigned » steinmb
steinmb’s picture

FileSize
2.15 KB
PASSED: [[SimpleTest]]: [MySQL] 40,564 pass(es). View

Ooobs, let's try that one more time without the stray line.

LoMo’s picture

Assigned: steinmb » Unassigned
Status: Needs work » Reviewed & tested by the community

Confirmed that everything covered here is now working, as expected. Part #5, I think, is unrelated enough it should have its own issue: #1741170: Installing with non-English language results in mix of languages in some part of the UI

Looking good! :-)

steinmb’s picture

Assigned: Unassigned » steinmb
Status: Reviewed & tested by the community » Needs review
FileSize
2.12 KB
PASSED: [[SimpleTest]]: [MySQL] 40,567 pass(es). View

Improved wording in INSTALL.txt

Artusamak’s picture

I was expecting #5 to be in a dedicated issue yes, the new wording looks great to me.

bforchhammer’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me as well.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Just made a couple of small edits to the text in INSTALL.txt w/ the help of Gábor and Julien to make it more clear what the "x"s in that string meant:

     If the directory doesn't exist, you should create it. Make sure your file
     is named drupal-VERSION.LANGCODE.po (for example, the German
     translation for Drupal 8.0 should be named drupal-8.0.de.po).

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

The changes documented here happened earlier so no changelog needed. Fully done for D8 and off the sprint. (Adding automated .po downloads will necessitate updating this instruction again, but that is a different issue).

Automatically closed -- issue fixed for 2 weeks with no activity.

ianthomas_uk’s picture

Issue summary: View changes
Issue tags: -revisit before beta

A fix has been suggested and applied after the revisit tag was added, so the tag is no longer needed.