Follow up for #1940590: META: Write a multipage multilingual tour.
Problem/Motivation
Multilingual configuration is spread throughout the site. It would be useful to have a tour to help users know how to configure the site for multilingual. There should be individual tours for certain multilingual features and these can be linked together to make a multipage tour later via #1940590: META: Write a multipage multilingual tour.
Proposed resolution
Write individual tours for the language section only.
Remaining tasks
Create tour yml files for the language tour:
Languages page (admin/config/regional/language)Add new language (subpage = admin/config/regional/language/add)Edit a language (subpage = admin/config/regional/language/edit/[langcode])Reorder languages
User interface changes
New tours
API changes
None
Technical pointers when creating tour tips
See: https://drupal.org/node/1921152#tour-tips-tech-note for tech notes on making tour tips.
How to test
- Use latest Drupal 8 and apply latest patch below (or use simplytest.me button next to patch)
- Enable Tour and Language modules (make sure to uninstall Language module if it was enabled)
- Go to: admin/config/regional/language
- Click on tour icon on upper right (don't see it? clear your cache at: admin/config/development/performance)
- Walk through first tour
- Click "Add language" button
- Click on tour icon on upper right
- Walk through second tour
- Go to: admin/config/regional/language
- Click "edit" on a language
- Click on tour icon on upper right
- Walk through third tour
- Provide feedback in a comment :)
Related issues
#1921152: META: Start providing tour tips for other core modules.
#1942576: Tour tips to be able to link to other pages and start tour's automatically.
#1940590: META: Write a multipage multilingual tour
Comment | File | Size | Author |
---|---|---|---|
#171 | interdiff.txt | 2.03 KB | balagan |
#171 | 2017471-tour-lang-171.patch | 13.05 KB | balagan |
#169 | interdiff.txt | 1.03 KB | rodrigoaguilera |
#169 | 2017471-tour-lang-169.patch | 13.07 KB | rodrigoaguilera |
#160 | interdiff.txt | 2.92 KB | rodrigoaguilera |
Comments
Comment #1
Kristen PolI'm going to play with this.
Comment #2
Kristen PolOk... they are pretty easy to make. The annoying thing is that you have to clear the cache and reload the page every time you make a change. Also, the yml file needs to be in the *active* config directory so it gets picked up. I'm not sure the proper way to do this so I just copied my file there for now. The active directory is something like:
So obvious! :)
The only other annoying thing is that there isn't always good markup to target exactly where you'd like the tool tip to show up. I will play with this some more.
Comment #2.0
Kristen PolUpdated issue summary.
Comment #3
Kristen PolHere's a first pass. There are 3 tours:
I'm looking for feedback on:
In general, I took this approach:
One thing to note: I added some links in the tips but these are relative to the domain and don't include any base path info... for example, I'm running my site locally at 127.0.0.1:8080/d8dev/index.php/[blah-blah] but the URLs end up being 127.0.0.1:8080/[blah-blah]. This is fine if all sites are run at the top level but that is not always the case. I'm not sure how to specify in the tour tip URL how to tack on the URL base path.
Comment #3.0
Kristen PolUpdated issue summary.
Comment #4
Kristen PolI added instructions on how to test the tours in the issue summary.
Comment #5
Kristen PolDidn't mean to remove tags!
Comment #5.0
Kristen PolUpdated issue summary.
Comment #7
Gábor HojtsyI ran through all three tours.
Are there any guidelines posted for tours? I see you made up some great things, but it would be great to conform to some common pattern. Even if we set that pattern up just now :D
I think the overview tour tip is a good idea and the next steps tip also sounds good. The tip on the operations and the save button on forms seems like a bit excessive :) Those are repeating elements throughout the site, so tour tips for them may become tiring pretty quickly.
Comment #8
clemens.tolboomThe language add tour end on 6 out of 8 ( in reality we have just 7 steps)
This one is skipped.
Comment #9
nick_schuch CreditAttribution: nick_schuch commentedHi clemens.tolboom,
Can post your yml file and I will take a look and see why we are gettting 6 of 8 on the last tip?
Comment #10
Gábor HojtsyBTW re the links, I think tour module should provide a text filter to form links to the proper local places. It may already do so.
Comment #11
nick_schuch CreditAttribution: nick_schuch commentedIm not sure I follow Gabor?
Comment #12
clemens.tolboom@nick_schuch I just did
$ drush iq-apply-patch 2017471
.Comment #13
nick_schuch CreditAttribution: nick_schuch commentedoh! A patch in #3! I will also take a look first thing tomorrow morning.
Comment #14
Kristen PolThanks for testing everyone!!!
Re #7:
I don't know of any guidelines for tour content or structure. The Tour API doc just explains how to use it. How would we go about creating "tour tip guidelines" doc? Would it just be an issue, or in the handbooks?
I personally really like the overview and closing tips. I don't know if others will want to adopt the same pattern but I think it is nice to give a quick summary of the page and then the closing "what you can do now". Once the multipage tours are working, the links can point off to the next tour on a different page.
I looked at the screenshots #1921152-29: META: Start providing tour tips for other core modules. and see that they have a "save changes" tip. Since this page doesn't have a lot of languages, then the "save" is pretty obvious and could be rolled into the tip for reordering.
The only reason *maybe* to have the operations one is that is it obvious that they click on it to get the "delete" option? Also, we can put the reason that the "delete" doesn't show up for the default language.
True. So... maybe these can be addressed on the overview tip? But, too many things on the overview and then they won't read it because it will become a wall of words ;)
I think in the case when the save button is far away from the rest of the page actions (beyond the "fold") then having the save tip makes sense. The operations one may or may not make sense... maybe it would make sense if you can give some insight into what happens when you use the operations.
Re #8:
This was an interesting issue (and bug, I think, with Tour). I added that tip to show up on the English language "edit" because the checkbox appears there. It does not appear for other languages. If you run the tour on the English edit page, you get 7 tips which is correct. If you run it on a non-English edit page, it says 8 tips (and it skips the checkbox because it's not there) so you end up with 6 out of 8.
I would need to understand how you *conditionally* add tips. What if there is markup that is hidden on the page and they click it open? Or, there are different options on the page depending on what you are editing. How do you handle this sanely in the tour? I don't know.
For now, I could leave out the English checkbox tip, but it is actually a very important checkbox that might need some extra attention.
Regarding #10:
It would be great to know how to put in the links :) Maybe @nick_schuch has some thoughts on that.
Thanks again everyone! This is fun stuff and I'm excited about this getting into D8!
Comment #15
larowlanre #10 I believe Gabor is advocating that tour can markup links automatically, if we wire them with /foo/bar and someone uses the site at /drupal/foo/bar it won't work.
But this would need its own syntax
something like {link|Continue next tour|foo/bar} could be parsed and output as
l('Continue next tour', 'foo/bar')
Thoughts?
Comment #16
Kristen Pol@larowlan Something like that would be awesome! Is it already supported or do we need a patch to [something] to support? If the latter, what do we patch?
Comment #17
nick_schuch CreditAttribution: nick_schuch commentedWell need a filter of some description for this. Ill look at other parts of core and see if we are tackling it anywhere else.
Comment #18
clemens.tolboomI just learned tour has a _test_ plugin TipPluginImage and only a TipPluginText for real.
The TipPluginText calls: filter_xss_admin($this->getBody())
My guess is we can use tokens for this and only have to patch TipPluginText
Comment #19
Kristen PolThanks @clemens.tolboom for looking into this... hmmm... I'm not sure if I know enough about the plugins and best tokens to use to attempt a patch for TipPluginText... any takers? :)
Comment #20
Gábor Hojtsy@Clemens: indeed, I think that is the right place to introduce this feature.
@Kristen: I think some guidelines for how to write tips would be good, we should start an issue AND a documentation page. So if there are conflicting viewpoints, we can use the issue to track ideas. Interestingly tour writing did not pick up as much as people hoped even though there was a big push to get in the tour module itself, it keeps being underutilized...
Comment #21
clemens.tolboom#2019469: Tour module should use token for it's body
Comment #22
larowlanYeah, we didn't get as much interest in writing tours as we hoped :(
Given they're essentially strings, I wonder if they're still ok after July.
Comment #23
Gábor HojtsyI think they are still ok after July for some time. Not sure how long, there are no defined points after that yet.
Comment #24
clemens.tolboomI just did (party) the tour for #1920468: Write tour integration for the first page after install showing extend and other things which was not that hard but still not trivial. The instructions on #1921152: META: Start providing tour tips for other core modules. are OK but 'is there a module for this'? would help UX people. `Me wants code`
Comment #25
Gábor Hojtsy#2019469: Tour module should use token for it's body is fully solved, so links can now be made in tours :) Just use:
<a href="[site:url]admin/config/...">...</a>
Comment #26
Kristen PolYep!!!! Now I have no excuse to not finish ;)
Comment #27
Kristen PolRegarding Tour documentation, I just searched and found:
So the most guidelines are on:
https://drupal.org/node/2000088
under "general principles" section.
Comment #28
Kristen PolHere are the updated tours. I removed some tips (mostly consolidation) and add an alter function that adds in some extra info based on if the interface translation and content translation modules are enabled.
Comment #30
Kristen PolThe test result doesn't make sense to me since the argument appears to be correct in language_tour_tips_alter... re-running the tests.
Comment #31
Kristen Pol#28: drupal8.language-module-tours.2017471-28.patch queued for re-testing.
Comment #33
David Hernández CreditAttribution: David Hernández commentedRemoving the requirement of the second attribute of the function language_tour_tips_alter to be an EntityInterface solved the issue, however, I'm not sure if this is the right solution.
Comment #34
Kristen PolThanks David... interesting... I just copied the function signature from the tour_test module... Hmmm...
Comment #35
nick_schuch CreditAttribution: nick_schuch commentedHi Kirsten,
I see you are using language_tour_tips_alter() to check if locale module is enabled to add additional overview.
Could the additional overview be separate tips? That way they will be displayed if a specific element is available on the page.
Comment #36
larowlanWhitespace
should type hint EntityInterface, requires you 'use \Drupal\Core\Entity\EntityInterface' at the top of the file
that will fix the warnings.
Comment #37
Kristen Pol@nick_schuch - I'm not sure I follow:
Oh... maybe I do. There is one check to see if locale is enabled so that it will decide to show a message about the interface translation numbers showing up on the page.
Is there a way in tours for a tip to show up *only* if the element is available on the page? On the edit page, I removed a tip because in one case (English language), it shows a checkbox and for other languages it does not. When I included a tip about the checkbox, the tip numbers were *wrong* at the bottom of the tips... e.g. there were 7 tips including the checkbox tip. For English, it was correct, 1 out of 7, 2 out of 7... 7 out of 7 (last tip). For other languages, it was wrong... 1 out of 8 ... 6 out of 8 (last tip!).
If there is a way to conditionally include tips if markup is present, that would make things easier. Maybe the above example is just highlighting a bug in Tour? Or in Joyride?
Comment #38
Kristen PolI updated the patch with changes from #36. Thanks @larowlan !
Comment #39
larowlan@KristenPol, the js will remove tips when their selector element isn't found on the page
Comment #40
Kristen PolThanks @larowlan. I found that it was buggy when it had that scenario (see comment #37). So... should I just add the tips in assuming that works as expected and that issue can be filed as a tour bug?
I'm worried that this issue can't get RTBC'ed with that bug I mentioned showing up.
Comment #41
clemens.tolboom@Kristen Pol pathc from #38 is empty. Can you please add a new patch.
Regarding the counter I've seen that now and then.
Will try to write a test for it in #2028535: Provide a TourTestBase class for use by core and contrib modules
Comment #42
Outi CreditAttribution: Outi commented@Kristen Pol I applied the patch from #33. The interdiff file didn't apply. I manually added into it the changes documented on the interdiff file of the #38, resulting this patch number 42 that should be similar to what you wanted on 38.
Comment #43
Outi CreditAttribution: Outi commentedThis is the interdiff file between the patch on the #33 and the patch on the #42.
Comment #44
Outi CreditAttribution: Outi commentedThis is not worth making a new patch on its own, but if someone is changing something else in the future, put this one in alphabetical order:
Comment #45
clemens.tolboom#35 and #37 are still not 'addressed'.
My problem with the use of hook_tour_alter lies in code interfering with the tour. Tour text is not anymore within a tour only. The translation workflow is very weird now.
In #35 @nick_schuch suggest to add more steps but that is only possible when the page contains something like a class body.module-no-locale.module-no-entity-translate to hide the dialog when those module are not enabled.
Guess token is not useful for this conditional behavior?
Comment #46
Outi CreditAttribution: Outi commentedI tested this tour as a user. It's pretty clear but I have a couple of suggestions.
- On the second window, it is said "To add more languages to your site, click the "Add language" button."
So I do: I click the button and add a language. Once the language imported, I see it on the list with the indication "0/232 (0%)" on the Interface translation column. That's normal but frustrating: as a user I might expect that once I've downloaded the language, I have the language and I don't need to translate anything.
So perhaps we should mention on the tour what it means to "add a language"; now, as an uninitiated used, I would be frustrated about not to know what to do and how to use my new language. All this should of course be explained shortly, the purpose being to reassure the user that everything is going fine.
(But I don't have any suggestion yet about how and at where to explain it!)
- On the third window, there is this paragraphe that is not clear to me:
"This order will determine the order in which languages are displayed in lists on the site such as in the language switcher blocks provided by the "Interface Translation" and "Content Translation" modules."
Are there several language switcher blocks that are provided by the Interface Translation and Content Translation modules ? If yes, is it useful to mention the modules? Could it be only "[--] such as in the language switcher blocks." If not, should it be reformulated, e.g. "[--] such as in the language switcher block or other blocks provided by the "Interface Translation" and "Content Translation" modules."
I would also remove the first "order" as it appears also in the first paragraph and later in the same sentence, and say: "This will determine the order in which languages are displayed [--]"
Comment #47
Kristen Pol@clemens.tolboom - Thanks for the feedback. Yeah... I had a note in #40 about what to do about the extra tips... sounds like I should just add them and hope all gets fix with the underlying "page N of M" issue which you noticed in #8.
It sounds like it's better for translation reasons to not use the language_tour_tips_alter to add in the extra tips body text... that is a shame (since it's kind of cool that it is "smart") but I understand the reasoning.
Can I add a new css class into the body in the language_tour_tips_alter so that my extra tips are triggered off of that? Not sure how that would work in D8.
@Outi - good stuff, thanks!
1) I agree that some more explanation would be good but not sure myself what makes sense ;) I'm a little puzzled though because I thought when you added the language it was supposed to automatically get the interface translations so maybe something is broken? Maybe there is an issue for that...
2) I also agree that just using "language switcher blocks" (by itself) is fine... don't need to call out the modules here. Right now there are 2 blocks but I think that they are trying to make it so there is only one (which makes more sense!). There should be an issue for that somewhere... so... maybe just mention "language switcher block" (singular) since you only use one at a time.
Comment #48
Outi CreditAttribution: Outi commentedKristen Pol:
Ah, perhaps it isn't normal then :). Actually, if you install the site in French for example, on the translation interface http://localhost:8888/drupal/admin/config/regional/translate/translate some of the strings are translated, some others aren't:
Now, if you install the site in English and add the French language on the language page, on the translation interface everything is empty and the proposed strings are not the same in the French installation:
So perhaps something is indeed broken, or perhaps the language files are not the same in these two cases.
Comment #49
c-c-m CreditAttribution: c-c-m commentedApplyed last patch and it worked fine (when using English interface only -in other languages the tour icon didn't show up).
The tour is properly display and I found the texts to be very helpful. Also links worked and are made relative to site's url (great!) and the number of slides (6) seem to be correct.
I'm tagging this as RTBC.
Thanks for your work!
Comment #50
Kristen PolThanks for the review @c-c-m :) I think there is still some work to do per #47.
I'll try to ping @clemens.tolboom to see how best to proceed.
Comment #51
clemens.tolboomThe hook_tour_alter is a weird feature of tour.module so guess we have to live with it :-/
I hope #1959660: Replace xpath() with WebTestBase::cssSelect() by leveraging Symfony CssSelector and then #2028535: Provide a TourTestBase class for use by core and contrib modules get's in too so we can really write tests easily for tours.
Apart from the tiny issues below it thinks it's RTBC enough.
the ability _to_ edit a language
we are always _using_ a directionality so that could use a rephrase.
Comment #52
Dries CreditAttribution: Dries commentedMoving to 'needs work' because of #51. Needs a quick re-roll and then I think we're good to go.
We don't camel-case each word in a title (e.g. 'Interface Translation' should be 'Interface translation'). May have to be fixed throughout Drupal.
Comment #53
clemens.tolboomI've applied feedback from #51 and #52.
I ran again into the hook_tour_tips_alter as CamelCase text needed to change there too. That is not cool :-/
Follow-up issue: #2031607: hook_tour_tips_alter is kinda blocking the Tour writer process
Also note we still needs tests but let's create those after #1959660: Replace xpath() with WebTestBase::cssSelect() by leveraging Symfony CssSelector and then #2028535: Provide a TourTestBase class for use by core and contrib modules lands as those will ease the burden of writing tour specific tests.
Comment #54
Kristen PolWell, there was an issue to make all *module* names Camel Case. In this case (ha), I'm referring to the *modules* and that is why I intentionally did Camel Case. But, if I was to just refer to the feature then I wouldn't.
So... I'm unclear if this really does need changing.
Comment #55
Kristen PolThis is the issue on proper name case vs sentence case:
#1346158: Decide on coding standard for capitalization of module names [policy, no patch]
Comment #56
nick_schuch CreditAttribution: nick_schuch commentedTour needs tests since we now have #2028535
Comment #56.0
kreatIL CreditAttribution: kreatIL commentedadd more instructions for testing
Comment #57
kreatIL CreditAttribution: kreatIL commentedAttending the mentored Core Sprint at DrupalCon Prague 2013.
The tour icon doesn't show up to me at all. I took patch #53, applied it to the latest d8 and followed every single step described above.
I also switched to English interface as default, which was mentioned in #49.
Comment #58
clemens.tolboom@kreatIL I just applied patch from #53 then had to uninstall the language module first to get the icon in place. (the reason is language/config/tour.tour.* files are copied to files/config_*/active on install only ; you may also visit update.php maybe)
please make this autostart and also other links to Tours.
Comment #59
clemens.tolboomI've added the tests ... which will fail on two tips on the admin/config/regional/language I somehow don't get.
Nothing has been changed on the tour.tour.* files.
@kreatIL I'll fix your patch in case you want to upload one :)
Comment #60
kreatIL CreditAttribution: kreatIL commentedPatch #59 worked for me. Before applying the patch I had to uninstall the Interface Translation module at first and the Language module right afterwards. After re-installing the Language module and clearing the cache, the tour icon showed up properly.
All three tours worked fine, without any errors (FF 23/Mac and also Chrome 29/Mac). Quite a nice feature :)
Comment #61
clemens.tolboom@kreatIL you could try to test the peculiar behavior by enabling the locale and translation_entity modules as the tips are changed on their availability.
We still wait for the testbot to finish but it seems to be reset whatever that means :-/
https://qa.drupal.org/pifr/test/637708
Test reset by client request. 25 min ago
Comment #63
clemens.tolboomThe failures are
but the elements are available when running the test locally. Hope someone will try this locally.
Comment #64
clemens.tolboomHow to test:
- on the test results verbose output page search for
jQuery('.action-links')
. It exists.The only difference between the data-class .draggable and .action-links is the '-' ... to test for this I've probed XML.php
and TourTestBase.php with
That did not help :-/
[EDIT]
and of course the call to cssSelect for assertTourTips()
[/EDIT]
Comment #65
larowlanPhp unit's xml select helper doesn't support several html 5 elements, Nick had been in conversation with them as it is going to be fixed in 3.8. There is an issue to update our version once that is released. In the meantime, an alternate selector might be possible?
Comment #65.0
larowlanAdded uninstall hint.
Comment #66
willieseabrook CreditAttribution: willieseabrook commented59: drupal8.language-module.2017471-59.patch queued for re-testing.
Comment #68
willieseabrook CreditAttribution: willieseabrook commentedStarting as part of DrupalSprintWeekend
Comment #69
willieseabrook CreditAttribution: willieseabrook commentedComment #70
oussema CreditAttribution: oussema commentedStarting work
Comment #71
oussema CreditAttribution: oussema commentedRerolled the patch against head
Comment #72
larowlanNote #1918768: Refactor tour module to use routes instead of paths just landed
Comment #74
danylevskyiComment #75
danylevskyiComment #77
danylevskyiComment #79
danylevskyiComment #80
danylevskyiComment #81
balagan CreditAttribution: balagan commentedFew notes and suggestions to change:
I think the following could be better organized:
"If you reorder the languages, click the "Save configuration" button when you are done for the changes to take effect."
suggestion:
"When you are done with reordering the languages, click the "Save configuration" button for the changes to take effect."
"You can edit the language's name, code, and directionality."
suggestion:
"You can edit the name, code and direction of the language."
"Note that you cannot delete the site's default language."
suggestion:
"Note that you cannot delete the default language of the site."
"You will get an additional form when adding a custom language where you can provide the language's name, code, and directionality."
suggestion:
"When adding a custom language, you will get an additional form where you can provide the name, code and direction of the language."
"You cannot change the language's code on the site since it is used by the system to keep track of the language."
suggestion:
"You cannot change the code of the language on the site, since it is used by the system to keep track of the language."
"Note that not all themes support "Right to left" layouts so test your theme if you are using "Right to left"."
suggestion (add comma):
"Note that not all themes support "Right to left" layouts, so test your theme if you are using "Right to left"."
Comment #82
balagan CreditAttribution: balagan commentedComment #83
raedkhurayjiI reviewed and apply the patch with enabling the Language module and i test add language and edit the language.
And i uninstall the Language module and it did not show me the languages menu.
Comment #84
raedkhurayjiI did see the last comment And i thank it need work
Comment #85
balagan CreditAttribution: balagan commentedSorry, I work on Windows, and could not find an interdiff tool in a realistic timeframe.
Sending a patch with my suggestions.
Comment #86
balagan CreditAttribution: balagan commentedComment #87
raedkhurayjiI reviewed the patch #2017471-85 And i enabled the Language module after that i check (admin/config/regional/language) and i click on tour icon and walk through
the first tour And it's work good and I click on Add language link and it's work good.
And click on tour on add language and work fine.
Comment #88
thlafon CreditAttribution: thlafon commentedI reviewd drupal8.language-2017471-85.patch and it worked as expected on the 3 differents paths
admin/config/regional/language
admin/config/regional/language/add
admin/config/regional/language/edit/xxx
The only thing i modified was a spelling mistake on the word "don" (done)
I also added an interdiff file.
Comment #89
Claudis CreditAttribution: Claudis commented88 Test applied and tests cleanly.
Comment #90
alexpottCan I change a langcode - yes or no? These statements seem contradictory.
Comment #91
Gábor HojtsyI don't think you can :D
Comment #92
balagan CreditAttribution: balagan commentedI have overlooked that. I also think directionality should be changed to direction.
Comment #93
balagan CreditAttribution: balagan commentedI have deleted "code", and also changed directionality to direciton.
Comment #94
balagan CreditAttribution: balagan commentedComment #95
balagan CreditAttribution: balagan commentedWe agreed in another issue that languages are not enabled, but added, although this text says that.
Comment #96
balagan CreditAttribution: balagan commentedChanged "enabled" introduced in this patch to "added". There is still one occurance of enabled in language.module file, but I suppose that might be changed in another issue.
Comment #97
balagan CreditAttribution: balagan commentedComment #98
balagan CreditAttribution: balagan commentedComment #99
balagan CreditAttribution: balagan commentedAccidentally put a dot instead of a comma. Fixed that.
Comment #100
balagan CreditAttribution: balagan commentedComment #101
balagan CreditAttribution: balagan commentedComment #102
balagan CreditAttribution: balagan commentedAccording to this issue languages are not enabled but added.
Comment #103
balagan CreditAttribution: balagan commentedChanged "enabled" to "added" in two yml tour files.
Comment #104
balagan CreditAttribution: balagan commentedComment #105
gnugetHi!
I did a quick review and i noticed one little thing:
Accord with the coding standards must be "elseif" instead "else if" (https://drupal.org/coding-standards#controlstruct).
Also, i believe this patch needs a reroll.
Regards.
Comment #106
balagan CreditAttribution: balagan commentedNice catch, but the reason the last patch does not apply is that this part with the "else if" is already committed into core :). I will reroll this patch without this part, and I think a new issue should be opened for this problem.Lol, I have just applied this patch, that's why I saw it in code. Sorry, I will fix it.
Comment #107
balagan CreditAttribution: balagan commentedHere is the rerolled patch.
Comment #108
balagan CreditAttribution: balagan commentedComment #110
Antti J. Salminen CreditAttribution: Antti J. Salminen commentedRerolled with changes needed by #2233787: Move default configuration into extension/config/install to clarify its purpose.
Comment #111
Antti J. Salminen CreditAttribution: Antti J. Salminen commentedComment #112
Antti J. Salminen CreditAttribution: Antti J. Salminen commentedComment #113
balagan CreditAttribution: balagan commentedCan you add an interdiff?
Comment #114
Antti J. Salminen CreditAttribution: Antti J. Salminen commentedSure, hope I created in the correct way.
Might not be all that useful though, actually the only change caused by that issue is that the .yml files had to be moved from config/ to config/install/.
Comment #115
balagan CreditAttribution: balagan commentedAs I see there were no changes, only that function language_system_regional_settings_form_submit($form, &$form_state) was moved a few lines up. I really wonder why my patch did not pass the tests then?
Comment #116
Antti J. Salminen CreditAttribution: Antti J. Salminen commentedThe linked issue requires moving the configuration to config/install instead of just config. The configuration was not installed when enabling the language module at all without the change. Sorry for not being more clear in the initial posting of the rerolled patch.
Comment #117
Marc Hannaford CreditAttribution: Marc Hannaford commentedTesting in sprint
Comment #118
Kristen PolComment #119
Kristen PolComment #120
Kristen PolComment #121
Kristen PolComment #122
Kristen PolComment #123
legaudinier CreditAttribution: legaudinier commentedWent through all the tours and the wording looks clear and easy to follow.
Comment #124
Marc Hannaford CreditAttribution: Marc Hannaford commentedReviewed and completed user testing - looks good
Comment #125
Kristen PolRemoving old sprint tags.
Comment #126
Kristen PolThanks for the patch! There is an extraneous comma in here:
"You can edit the name, and the direction of the language"
since "code" was removed.
This is a great easy change for someone to update this patch. :)
And, I'm removing the "Needs tests" tag because tests were added.
Comment #127
Kristen PolReally removing the "Needs tests" tag this time.
Comment #128
Kristen PolComment #129
Marc Hannaford CreditAttribution: Marc Hannaford commentedTrying to do patch
Comment #130
Marc Hannaford CreditAttribution: Marc Hannaford commentedRemoved comma as pointed out in #126.
Comment #131
Marc Hannaford CreditAttribution: Marc Hannaford commentedAdding interdiff file
Comment #132
legaudinier CreditAttribution: legaudinier commentedTested and the extra comma is gone.
Comment #133
martin107 CreditAttribution: martin107 commentedtriggering testbot
Comment #134
Antti J. Salminen CreditAttribution: Antti J. Salminen commentedRerolling, moves tests to the correct directory for PSR-4.
Comment #135
aloyr CreditAttribution: aloyr commentedDrupalCon Austin 2014 Sprint - manually testing patch #2017471-134
Suggestion: on the "editing language" tour, step 1 out of 5, add a comma:
From:
This page provides the ability to edit a language on your site including custom languages.
To:
This page provides the ability to edit a language on your site, including custom languages.
Comment #136
aloyr CreditAttribution: aloyr commenteduploaded new patch, with suggestion on #135
Comment #137
Nomes CreditAttribution: Nomes commentedComment #138
tomreavley CreditAttribution: tomreavley commentedComment #139
tomreavley CreditAttribution: tomreavley commentedComment #140
mon_franco CreditAttribution: mon_franco commentedComment #141
mon_franco CreditAttribution: mon_franco commentedThe latest patch needed reroll, so please, find attached it. I still working on this issue.
Comment #143
penyaskitoThe problem is the edit routing name changed, from
language.edit
toentity.configurable_language.edit_form
For knowing that, I checked which test failed, in which line, and there I saw that it was looking at language edition path (
admin/config/regional/language/edit/en
). Then I checked the tour at the patch, and thelanguage.routing.yml
in HEAD and found the mismatch.Comment #144
penyaskitoAdding to the sprint.
Comment #145
mon_franco CreditAttribution: mon_franco commentedThanks for your help @penyaskito :)
I have made the change mentioned.
Now I will wait for the new test and once everything goes well, I can start to test the tour help.
Comment #146
penyaskitoNice :-) You need to change the status to Needs Review so the testbot picks the patch.
Comment #148
Gábor HojtsyNot being worked on for a month. Removing from sprint.
Comment #149
rpayanmComment #150
jhodgdonGreat this is being restarted, thanks!
Nitpick on the patch:
I don't think we normally have a space between ! and what it is negating in an if()?
Comment #152
rpayanmComment #154
YesCT CreditAttribution: YesCT commentedComment #155
rodrigoaguileraFirst the rerol of #150 since #152 is not correctly made.
Let's see what the testbot thinks.
Comment #156
rodrigoaguileraThe test in the patch was not running because it had no annotations .
Corrected routing and some selectors.
Now is ready for review.
Comment #157
jhodgdonI read through the tips, and they mostly look good!
A few little things to fix:
a)
"...you will get an additional form where you can provide the name, code and direction of the language."
==> Needs comma after 'code". In the Drupal project, we use serial commas in lists.
b)
"You cannot change the code of the language on the site..."
==> I think I would change "the language" to "a language" here.
c)
"Viewing added languages" [link text]
I think saying "added" here is misleading or kind of incorrect. It should be "Viewing configured languages". This appears in several places in the patch.
d)
"The language name is used throughout the site for all users and is typically written in the same language it represents."
==> I believe this is incorrect? I think you typically need to write the name in English (or the default language of your site), and then translate it into other languages using Config Translation. If you want to provide it in another language, you'd have to set the language of the config to that other language first.
==> I also think the wording here is a bit weird at the end "... language it represents". Hm. Well hopefully this part is going away anyway.
e)
"The "Languages" page provides features for adding, editing,..."
==> I wouldn't say it "provides features for". In hook_help() text, we have typically used language like "allows you to".
f)
"After adding a new language, it will be displayed in the language list and can then be edited, reordered, and deleted."
==> Well. One language can be edited or deleted. The entire list can be reordered. This is imprecise writing.
==> Also this could be more concise: Added languages will be displayed in the language list, and can then be edited and deleted.
g)
"This order will determine the order in which languages are displayed in lists on the site ..."
==> More concise: "The order shown here is the display order for language lists on the site..."
h)
"Note that you cannot delete the default language of the site."
==> Can you delete a language that has been used? For instance if you create some content and translate it into Spanish, can you then delete Spanish? What will happen if you do? I don't know the answers to those questions, but it might be good to figure that out and either say something like "... or languages in use on the site ..." or "... Do not delete languages that are in use..."
i) This tour does not tell me how to set the default language.
j) In the tips_alter function:
That ' should not be escaped within "" quotes.
k) same function
The module name is Interface Translation (note capitalization), and it should not be in quotes. Thus the whole thing should be in "" and the other ' should not need to be escaped then.
l) The other modules mentioned lower down in that same function need the same capitalization fix... and shouldn't these be in t() calls?
Comment #158
rodrigoaguileraThanks for the thorough review.
I think I took care of all that you noted. I took the information of what happens when you delete a language from the confirmation screen displayed when deleting a language.
Comment #159
jhodgdonLooks mostly great!
Regarding item (d) "If you want to provide the name in another language, you have to set the language of the configuration to that other language first."
So ... sorry for the confusion... I am not even sure this is possible to set in the language config UI. Did you verify that?
Also in the tips alter function:
Still do not need "site'\s" with the \ before '
I'm also wondering here:
Maybe the better thing to do here would be to ask the module handler service for the name of the module, rather than hard-wiring it into this tip? Try ModuleHandler::getName('machine_name'). Sorry I didn't think of that before the last review. :)
The rest looks good... but someone more familiar with i18n should probably try out the Tours and verify that they are all accurate.
Comment #160
rodrigoaguileraNo, is not possible in the language config UI, you can only change the name in English.
I'm changing the wording to:
If you want to provide the name in another language, you can use the Configuration Translation interface.
Also translation_entity has been renamed to content_translation
Comment #161
jhodgdonInterdiff looks good! I haven't actually tried the tour, and again I'm not sure about the accuracy, but all of the issues I identified have been handled well IMO.
Comment #162
Gábor HojtsyEither the interface translation or config translation modules may be used to translate languages which were in the predefined language list. Languages which were added custom (ie. language code not in the predefined list), they can only be translated with config translation.
Comment #163
rodrigoaguileraOk, I will change the text to reflect that.
Comment #164
jhodgdonThe text is also about how to *enter* the language name though:
The language name is used throughout the site for all users and is typically written in English and then translated using Configuration Translation. If you want to provide the name in another language, you can use the Configuration Translation interface.
I'm unsure about the "typically", or what happens for someone who doesn't even have English enabled on their site (e.g., installs in Spanish and adds Portuguese).
Comment #165
rodrigoaguilera@jhodgdon The name in that interface is entered in English always.
Comment #166
Gábor HojtsyRight now the language entities are all saved in English and then translated from there. Possibly once #2212069: Non-English Drupal sites get default configuration in English, edited in English, originals not actually used if translated lands, they may end up being in some foreign language, but its a tricky question. For now we should assume they are in English by default, that is how its implemented now.
Comment #167
jhodgdonOk then we should take the word "typically" out of the Tour item. ;)
Comment #168
jhodgdonSo I think this should say:
The language name is used throughout the site for all users and is written in English. Names of built-in languages can be translated using the Interface Translation module, and names of both built-in and custom languages can be translated using the Configuration Translation module.
Comment #169
rodrigoaguileraChanged the tip with that explanation
Comment #170
jhodgdonLooks good to me.
I haven't actually tried to run either of the tours, and I'm not an expert on D8MI functionality. So I've reviewed the text for Drupal docs standards, grammar, and clarity, and I think it's good... But someone else should try the tours, verify they are accurate and that they work well (point to the right items on the page etc.), and set to RTBC (or Needs Work if more appropriate). The issue summary lists the pages the tours are on.
Comment #171
balagan CreditAttribution: balagan commentedMade Content and Interface Translation module names uppercase as noted before, corrected some typo, and I have found "The site will use the default language in situations were no choice is made but a language should be set, for example the language in which the interface of the site is displayed.", which I found a bit confusing. Note this sentence contained the typo too (were instead of where).
Comment #172
rodrigoaguileraThanks, now is more clear indeed
Comment #173
Dom. CreditAttribution: Dom. commentedManual functionnal testing:
- Installed fresh Drupal 8 from pulling latest GIT code + adding patch #171 :
OK, patch installed cleanly. Install done with standard profile install, default english language. Tour is enabled by default, Language is not.
- Enable Language module :
Ok, nothing particular to say.
- Go to: admin/config/regional/language:
Done, only english available and activated.
- Click on tour icon on upper right:
Ok, present directly, no need to clear cache or whatever.
- Walk through first tour :
OK, a popup display centered on screen as expected. English is not my native language so I might not correct any english here but it says "the 'Languages' page". Here are some not directly related notices while going on the Tour :
- Click "Add language" button
- Click on tour icon on upper right and walk though this Tour
- Go to: admin/config/regional/language, click "edit" on a language:
Done it to edit english.
- Click on tour icon on upper right; walk through third tour:
Everything went well here ! Functionnaly speaking it seems to make the deal.
What this test did not include is :
I do not change to "reviewed by community", mainly because of remaining point 2.
Comment #174
rodrigoaguileraThanks for the review.
The " not directly related notices while going on the Tour" should be discussed in another issue since they are general D8MI terminology and if they need a change, it should not be in this patch. I think having a previous button would be nice.
The direction of the language is explained in the edit-language tour. I think is enough for not being repetitive.
I find the language code info useful but again, needs opening another issue if you don't want to see it there.
Checking the translation of the tooltips would require to have the strings translated on https://localize.drupal.org or provide a mock translation. I think is not worth it to check the interface translation here and previous tours are not doing it.
There's no logic involved here, just yaml files so no need for unit testing.
I used codessniffer on the lines involved and they are ok.
Overall I thing the patch is good and since it had manual reviews for the patch and for the tour itself I am marking it RTBC. Correct me if tours are not allowed to enter in the beta phase.
Comment #175
rodrigoaguileraThe previous button is being worked on here
#1921136: Previous button for tour tips
Comment #176
alexpottAdding UI help is not frozen in beta. Committed 35f1560 and pushed to 8.0.x. Thanks!
Comment #178
rodrigoaguileraI'm making other tours and I realize we messed it up with the
<p>
tags in the body keys of the yaml. They shouldn't be there. How should we proceed to fix this? Another issue?Comment #179
rodrigoaguileraI opened this one and fixed it there
#2443871: Wrap tour tips in DIV instead of P to allow arbitrary HTML tags in tips