Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Current UI for string translation needs some love, there's initial work done in #532512-38: Plural string storage is broken, editing UI is missing
I'm trying to use Vertical tabs for languages see
From IRC
GaborHojtsy: andypost: no work yet on rebuilding the locale UI to be similar to l10n_server, I'd expect to start working on that later
GaborHojtsy: andypost: I don't think that should be part of this patch at all
andypost: GaborHojtsy : i'm going to fix tests but not sure about UI because without UI this patch seem uselees
GaborHojtsy: andypost: I think if you just have vertical tabs in every case for languages or just bare fieldsets for every case (more similar to what we had before), that is absolutely fine for now
andypost: GaborHojtsy : as for me VT looks much pretty
GaborHojtsy: andypost: this is hopefully not going to be the final UI so I'd not waste their time :)
GaborHojtsy: andypost: then apply the VT for the regular case too :)
GaborHojtsy: andypost: so I think the basic approach of how we do the editing form will likely change to in-line translations, basically 2 columns with the first being the source strings found for your search and the second with input fields for translations; if the string was plural, x input fields as your formula requires
GaborHojtsy: andypost: BUT, BUT that should not be the matter of this patch, so just consider this an interim UI
GaborHojtsy: andypost: yup, so the l.d.o UI is two columns (source; target) and target has as many input fields as needed (1 for singular, X for plural), and I think the core UI will work much like that in D8 if we get to that
GaborHojtsy: andypost: oh, we can definitely open one about it if you have someone to work on it :)
Comment | File | Size | Author |
---|---|---|---|
#234 | locale-ui-changelog.patch | 686 bytes | Gábor Hojtsy |
#224 | 1452188-new-lang-ui-224.patch | 67.15 KB | Schnitzel |
#222 | 1452188-new-lang-ui-222.patch | 67.17 KB | Schnitzel |
#220 | 1452188-new-lang-ui-220.patch | 32.7 KB | Schnitzel |
#219 | 1452188-new-lang-ui-219.patch | 32.63 KB | Schnitzel |
Comments
Comment #1
andyposthere the screens from l.d.o
Comment #2
Gábor HojtsyI think we can go directly to only have textares in the right column but otherwise this l.d.o approach is better. Ie. editing one language at a time but more strings. Like so:
Comment #3
andypostSuppose Language should be a part of right because it's already in filter
about right part I think better to use interaction used for FieldUI (formatter settings)
Comment #4
Gábor HojtsyYou mean right == subtabs on the page? I'm not sure that scales well to many languages. Like l.d.do (although it is an edge case) would totally blow up if the languages were subtabs. I think its fine if it is a select box right now, just make it required and loose the "any language" option (default to the site language). AFAIS that sounds best.
Comment #5
andypostI mean that we displaying strings and links (languages or translations itself)
Comment #6
Gábor Hojtsy@andypost: I don't think we should be that fancy and require the user to click on actual links to get to translation forms. As said, people are much more likely to care about translating to one language (in which case the tiny links to click are a lot of hassle). So instead of the links to languages and the extra click to translate in a popup, IMHO we should just include the textareas inline right there and only show the whole thing for one language at a time, letting you to switch languages if you want to.
I think this approach is much more useful for the 80%, the fastest to use to translate stuff and is nicely UI-compatible with the localize.d.o UI so lets people move seamlessly from one to the other.
Sounds like a win-win? :)
Comment #7
Sutharsan CreditAttribution: Sutharsan commentedI agree with Gábor that translation is usually per language, therefore quick switching between languages is not required.
I expect this interface to be used for minor translation changes, usually late in the building process. It will be used to fix untranslated strings, improve translation consistency, changing translation style and simplify some strings. Strings are translated one-by-one (fixes, simplify), or translated multiple strings together (consistency, untranslated strings).
I'll make a wireframe based on this.
Comment #8
Gábor HojtsyI don't want to turn down all the creativity :) Just wanted to say I think it would make most sense to have a sufficiently similar UI on localize.drupal.org vs. the Drupal site, so people use a tool familiar to them when contributing to the community and editing their own stuff. Also, we can port some of the goodness like the placeholder matching to core from localize.drupal.org for example. I'm wondering if the l.d.o UI (minus the multiple suggestions possibility and differentiation between suggestions and translations) is not good for local editing, then any improvements we want to make to that model would also be good for l.d.o, so we can enhance in that direction?
Comment #9
Sutharsan CreditAttribution: Sutharsan commentedNo time to waste ;)
The l.d.o interface would be a good starting point. Perhaps a bit less bells and whistles. The l.d.o interface is made for larger numbers of translations, the site translation is (and should be) for less. If we want people to translate large numbers of strings on their site, we should make it easy to contribute it back to l.d.o like l10n_client does. But lets leave that to contrib space.
Comment #10
Gábor HojtsyYes, I think if we can have a simple UI in core, we can build in the l.d.o contribution backend via a contrib module still :)
Comment #11
Sutharsan CreditAttribution: Sutharsan commentedI've taken elements from the existing interface and the l.d.o interface and tried to keep it compact.
Comment #12
Gábor Hojtsy@Sutharsan: that looks fabulous. I wanted to say that even though people might only want to translate one thing at once, putting the edit control right there when they found the string is the quickest way to go, vs. the current method of needing to click a link and get a page reload and @andypost's proposal above to click a link and get a popup. I think your proposal merges the benefits of the immediacy of the l.d.o UI with the possible need of cross-language editing, and people will just see if they actually need this feature :) It should not be hard to implement.
The only thing I'm wondering about is the reset link. What would that do? Reset to community translations (we might have those) or reset to built-in English (basically empty out the input)?
Also, if you don't mind I'm going to use this mockup in my D8MI session in Denver. Its great :)
Comment #13
Sutharsan CreditAttribution: Sutharsan commentedI deliberately did not explain the design. If it explains itself it is good. The reset link is not obvious. It is meant to revert the change back to the status when the page was loaded. Multiple textfields came from the requirement to make changes for consistency, usually multiple translations at the time. But when making multiple changes one may want to revert a single translation and not trash the whole page. We could hide the 'reset' until the field content is modified.
Comment #14
Gábor HojtsyShowing the link once you chnage the field sounds good, it would let you discover what it is about IMHO.
Comment #15
andypostI think we should implement inline edit (textfields should appear only on click to text or edit link)
Reset - confusing
Comment #16
Gábor Hojtsy@andypost: I don't think people would understand inline editing until it is introduced later in Drupal core. Anyway, inline editing would be a more advanced version of Sutharsan's design, right? It would still need to be able to save multiple textareas from the page in different languages for different strings.
Comment #17
Sutharsan CreditAttribution: Sutharsan commentedIf inline editing would be excellent here. But if it is not in core we should not try lifting it from this edge. The design was not made for inline editing.
'reset' is the same as 'cancel' We can try it if people understand and/or need this concept. But it is not a vital part of the design and can be left out.
Comment #18
Gábor HojtsyThe reset link would work in the webpage context in the browser (JS only) I assume so it is pretty easy to remove/add I guess as we see fit.
Comment #19
yoroy CreditAttribution: yoroy commentedLinking back to #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages from here.
Comment #20
Gábor Hojtsy#532512: Plural string storage is broken, editing UI is missing landed, so thtat unblocks this issue. Yay!
Comment #21
klonosAs I understand it we are going with the UI design shown in #11. Right>? If so, then I'd like to ask if it is obvious for translators for languages with complex plural formats what they need to enter in the multiple fields.
Comment #22
Gábor Hojtsy@klonos: it is the same UI we have on localize.drupal.org for years (see screeensho in #1) and nobody complained yet :) we are just merging the best of both worlds here, cycling back the experience from localize.drupal.org to core.
Comment #23
klonosThanx for taking the time to explain this Gábor. I never checked localize.drupal.org so to know though. You see, I intent to use this feature in my D8 sites in order to allow specific roles to localize/translate the UI. These users won't (necessarily) be familiar with localize.drupal.org and I'm gonna have to train them. I just thought we could use some help text explaining things for languages with complex plural forms. That's why I asked in the first place.
PS: If you think that adding help text to languages with complex plural rules would be a UI bloat, then how about we add it in the fields with jQuery like we do with the search field in d.o (help text or example goes away on field focus).
Comment #24
Sutharsan CreditAttribution: Sutharsan commentedHave a look at the Localization client for interface translation. It also has an option to contribute the translation back to l.d.o.
Greek (like Dutch, my native language) has only one plural form. We should not ask ourselves whether it is a problem. We should ask native speakers of languages with multiple plural forms how they perceive the interface.
Comment #25
klonosThanx Erik. I already know about Localization client (never used it though - just saw screenshots/screencasts and read the project's description), this work here though is for D8 core.
That's what I'm asking back in #21:
I'd also like to add to the suggestion that we should ask people with no previous Drupal experience. The UI might make sense to Drupal site admins, but I guess that the intention here is for it to be used by people that simply require an easy to understand and use translation interface. Right? They don't need to get a Drupal admin crash course too. Will they?
Comment #26
Gábor Hojtsy@klonos: lets get translators here to provide feedback then! Can you help get some? Also remember, that we are building in l10n_update in Drupal 8, at least that is our plan, so this UI in core would be used more for touch-ups and quick local modifications, since translations will be fed from localize.drupal.org directly. That is definitely not a reason to make this obscure :) but it means this UI will not be used as heavily.
Comment #27
botrisThe mockup looks good. But what are the goals for the new UI?
If it's solving the singular / plural, then this is it.
This might be off topic, but what I'm missing in the UI is the possibility to specify different translations for different contexts/modules. As words don't always have the same meaning in every context.
Comment #28
Dragan Eror CreditAttribution: Dragan Eror commentedIt looks pretty useful to me...
Comment #29
Gábor Hojtsy@Boriss: indeed, the context would be displayed with the source string (if the developer provided it).
Comment #30
DjebbZ CreditAttribution: DjebbZ commentedGiving feedback : The UI is great. I agree with klonos, help text could help understand the purposes of the multiple fields. I must admit that I still don't understand the part in #21. Why 3 text fields with plural forms when the 'source' column has one singular form and one plural form ?
About the help text : having a help text for each plural form text field could lead to UI bloat, I agree. So why not hardcode just a single message at the top of the translations, saying something like "@count is for the plural form" ? Like that :
Comment #31
Gábor Hojtsy@DjeebZ: @count is used in non-plural items too (although not often). Also, if you look at the Croatian example (which was pulled from their real translation), they need to use @count in the "singular" version too because it is used for many cases of plurals too. Really where these values get used depend on the plural formula for the language. Those not familiar with the language will definitely not know what the fields mean, I don't think that is an issue per say.
For example, Croatian has this plural formula (pulled from localize.drupal.org): ((($n%10)==1)&&(($n%100)!=11))?(0):((((($n%10)>=2)&&(($n%10)<=4))&&((($n%100)<10)||(($n%100)>=20)))?(1):2)); So the first version is used for every number which divided by 10 gives but bot divided by 100 does not give 1, so 1, 11, 21, 31, 41, 51, 61, 71, 81, 91 (but not 101), 111, 121, etc. So it is not even the singular version for Croatian, it is the singular and then used at many other instances too. Not sure how to express this in a concise help text especially that multiple languages with different rules might be displayed. Therefore my proposal to let people understand what pertains to them which I naturally expect them to understand without complicated descriptions.
I might be wrong, in which case we need to figure out how to describe pieces of a mathematic formula that is dynamically provided for Drupal. We might be able to do that with t('Singular form'), t('First plural'), t('Second plural'), t('Third plural'), etc, so each can be translated properly individually as applicable to the language, so we toss the problem of how to explain the use of the textfield input to the translation team :)
Comment #32
Sutharsan CreditAttribution: Sutharsan commentedIt is like explaining the ocean to a goldfish in a bowl. As non Croatian speaker I can not imagine how it is for them to have three plural forms. But it would not supprise me if a native speaker would require only a minimal suggestion. It would probably need much more effort to get the proper translations for 'Singular form', 'First plural', 'Second plural', 'Third plural'. Because, what word would the goldfish use for the ocean?
I thought about transforming the plural formula's to some meaning full instruction to the translator. But this is programmatic reverse engineering and would be very, very hard to do.
Comment #33
Gábor HojtsyRight, good point. We'd need to explain *in English* for this UI what does the different plural variants are for Croatian and how are they applied. Depending on the translation is not an option because we are displaying the UI in a language used for translation, not in Croatian.
Comment #34
droplet CreditAttribution: droplet commentedHere is my mockup:
#1: All columns should be fixed width. Source & translation columns should be equal.
#2: Preferred show Lang code instead long name. eg. "Chinese Traditional" taken too much space. (the best is remove it, how many users translate more than 2 lang at same time ?)
#3: " COPY=> " between source & translation string. more visible directly
#4: KISS, but prepare it to integrate LDO features. eg. add upload to LDO button, get suggestion from LDO..etc. It is good for whole community.
#5: "Submit and go to next page", save your time to click page #2. It placed on the right bottom of page because we more focus on translation column and moving down. (I guess its broken Drupal core design pattern)
#6 If really needed, we can add Singular / Plurals help text above inputs ( or use javascript to show hint when users focus on the input fields), html5 placeholder is another choose.
Comment #35
Gábor Hojtsy@droplet: just a quick note that "singular" is not singular in some languages, see the Croatian example in http://drupal.org/node/1452188#comment-5724880 above. Otherwise this looks like a slight variation of @Sutharsan's, basically you moved the language to first column and shortened it. I agree with the save and go to next page button suggestion (been also working on that for a while for l.d.o).
Comment #36
Ranko CreditAttribution: Ranko commentedI might be wrong on the specific case of Croatian, but we have only one plural; but this looks like an issue with cases the word is used in. There are seven cases in Croatian, but that issue is present in other languages (4 in German, up to 18 in Hungarian...).
Can you point me to the source you pulled in #31? Maybe I can shine some light on what it tries to do and then extrapolate a more global comment :)
Comment #37
Gábor Hojtsy@Rnako: yes, see http://translate.sourceforge.net/wiki/l10n/pluralforms for a list of various languages with their plural logic. Irish has 5 plurals while Arabic has 6, so imagine the plural UI with 5, 6, etc. fields respectively for those languages. Granted, most languages have much less variants. I think for someone know *knows* Irish or Arabic, their natural expectation is they get 5/6 input fields to enter their translation for singular/plural strings and that they likely know exactly how to use each. But I'm no Irish or Arabic.
Comment #38
DjebbZ CreditAttribution: DjebbZ commentedDidn't know Croatian was so complex :) But now I think of it, in Arab for instance there 2 plural forms : one for a couple (2) of items, one for 3 or more... Babel tower...
Now I understand that various languages have various plural formulas. Can we just write at the bottom of the screen a small instruction (so that the UI don't blow up) explaining why some translations have several input fields ? It could be useful, because sometimes the people who input the translations are not the translator themselves (think of external services, where one send back and forth an Excel file etc). Sometimes it's the developer himself who inputs the translation for all languages.
I admit it's a very complex human/machine problem, so no perfect solution exists.
Comment #39
xjmRegarding #36 and the question about cases: in general which case should be used would be given by the context of the particular string; the UI is needed for when there are different forms of the noun depending on the number in the same sentence.
All the same sentence, "I have X cat(s)," with a count of 1, 2, and 5:
The forms would be different in a different sentence (where the cats were not the grammatical subject) but that would be indicated by the specific context of the string.
Many languages have at least a special form for a dual, and a special form for 10x + 1 is not uncommon either, but there's no general rule to extrapolate. :)
Is it possible to add an "Add @count" button that adds a new field, so that we don't have to display a fixed number? Edit: And then on a per-language basis allow a label for example numbers with that plural form. (In the case of Russian it might be 1, 2, and 5; in the case of another language 1, 2, and 3; or 1/11 and 2; etc.)
Comment #40
Gábor Hojtsy@xjm: Drupal should already know the number of plural variants used (and the formula for when is each of them used) for the language when this UI is displayed, so it should not be possible to enter more variants. We'd not have a formula to decide when that extra variant would be used.
Comment #41
Pasquallesingular form-> plural formula 0 #1295792: document misuse of format_pluralComment #42
Sutharsan CreditAttribution: Sutharsan commentedWe should distinguish between languages with simple and with complex forms. Languages with one plural form can be served with a t('Singular') and t('Plural') label. Languages without plural form may not need a label at all.
But, the Russian example in Pasqualle's post in the above issue gives me the idea that a strict translation of t('Singular form'), t('First plural'), t('Second plural'), t('Third plural') will not work for languages with complex (>1) plural forms. Every plural form (plural_formula[n]) requires a short description and/or example. In some languages these plural forms may have a name, but certainly not in every language. I expect it to quickly exceed the limits of the user interface or bloat it. And since the interface language of the website is independent of the language being translated, we can not rely on t() to do the job. Languages with complex plural forms could be served with a short label plus an help link to documentation on (l.)d.o.
Comment #43
andypost+1 to #41
We actually need to use @count in singular form because of
format_plural($count, '@count kitten', '@count kittens')
for russian:
1 kitten => 1 котёнок
21 kittens => 21 котёнок
Comment #44
Gábor Hojtsy@andypost: yeah, @count is introduced in translations, where needed, see the Croatian example. Also @count is replaced in the singular form too, right, so there is all the flexibility there for supporting Russian and any other languages. I think the '1 kitten', '@count kittens' in the original English version in fact helps people understand how it is supposed to be used and suggesting to use '@count kittens' and '@count kittens' would confuse it on the original API side. Since it works either way, it is more down to coding standards. Would translators not understand that they can introduce @count as needed as translation of '1 something'? (I can imagine that might be true, but not sure 'obfuscating' the suggested use of format_plural() in the coding standards is the way to solve it.) Maybe a little help text under the singular form saying 'You can use @count here too if needed' or something along those lines would be good?
Comment #45
andypost@Gábor Hojtsy: I know about @count replacement. Suppose having docs for translation teams is enough and there's already #1295792: document misuse of format_plural
About #42
I don't think it's a good idea about naming inputs because source string always a singular or plural after #532512: Plural string storage is broken, editing UI is missing
In case of plural source string: all translations are plural forms (there's no singular) - first plural, second plural.
In case of single string label "translation" just eats a screen place.
Also we should take into account the tablet and mobile users for D8 - they should have ability to translate strings too!
All mock-ups from #11 have language column in table - I think this bad idea because it makes this table bigger. Source string has many duplicate lines for each language. For example "reset" string for site with 10 languages eats a whole screen just for 1 word.
So language should live in filter or in translation part (preferable) my example in #5 shows this - 1 line per source string and many links (having textfields or textareas by default also makes screen bigger) to translate per language also this links shows actual status of translation. All operations in this screen are attached to one single form with current translation to 1 language so no problems to send this translation to server.
Watching tremendous disqus about module's page I think we should have this listings in same maner #538904: D8UX: Redesign Modules Page
For this purpose don't forget about #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages
Comment #46
Gábor Hojtsy@andypost: I'd argue that for the translations of singular/plural pairs, the first variant is always the "first plural" and that there would be no singular. If you look at the formulas in http://translate.sourceforge.net/wiki/l10n/pluralforms, you'll see that an overwhelming number of them have the nplurals=2; plural=(n != 1) rule, which is exactly equal to English. It means that number 1 and all other numbers (positive, negative) use different variants. So there is a singular and a plural variant for these languages. Other languages have all kinds of other rules, but for those using nplurals=2; plural=(n != 1), the first variant *is* *the* singular and the second is *the* plural. So its not easy to make such assumptions wholesale.
Interesting you mention tablet and mobile users for translation. First of all, this UI is once again targeted as a touch-up interface for fixing things you don't like with the translation coming from localize.drupal.org. So it is not likely to be used daily. Second, your mockup from #5 in fact uses pretty tiny links for the language names, which are clickable to reveal a popup textarea. Tiny links are very hard to click on small mobile devices, while the textarea provide a convenient big touch area to tap for typing. Also, the point is that people come to this screen to translate stuff. Why hide their tools of translation (the textareas) under extra clicks, when we can lead them directly to their tool and let them edit.
Comment #47
Bojhan CreditAttribution: Bojhan commentedI remember reviewing this multiple times before, in earlier revisions. Are we planning on completely redesigning it again? Will/should it actually be part of core?
Comment #48
Gábor Hojtsy@Bojhan: I don't think you reviewed it, maybe you mix it up with #1282018: Improve UX of language-aware entity forms which is for entities. This UI is for strings displayed on the interface, like 'Save', 'Home', etc. We already have a pretty bad UI in core. Do you want to have a before/after comparison? :)
Here are two quick screenshots from l.d.o (D6). Sorry, this is a bit extreme, there are many languages, but you get the idea. The D7 UI is essentially the same.
The current D8 UI uses vertical tabs for the languages, so its much more compact (and also allows for editing of singular/plural translation). Reproducing the picture from the OP:
The main problems we are trying to solve is that when you go to translate stuff, you want to do it as soon as possible. What the UI provides instead is a summary of languages and then you need to go edit. Both the summary of languages and the edit page uses all languages, while you likely care about a specific language. So instead pulling in the translation textfields into the results UI and making it possible to edit right away looked like a great idea. Surtharsan proposed on top of this to keep the possibility to handle multiple languages at once (or you can focus on one language only with the filter on the top of the form). Reproducing his proposed UI:
Is this clear to understand the goals? (Adding back tag to get your feedback again, let me know if this is not the right procedure).
Comment #49
Bojhan CreditAttribution: Bojhan commentedBefore I provide redesign possibilites, can you please clarify further why this UI should be part of core? I am not completely following the 80% usecase for this one.
EDIT: I have had a chat with sutha, who explained to me what the goal of this functionality is - which primarily comes down to adjusting badly translated strings or simplifying existing text.
My biggest concern with this use case, is that from my perspective it isn't a very big one. Especially with the many improvements down the line regarding updating and locally changing translations. This functionality will used even less. Is this really an 80% use case in the context of translation? If its not, should reconsider adding this to core?
I am also concerned that the UI, although sutha's improvements go a long way - still requires a few large iterations to be useful. It's a UI that is very much a one-off in core, which will make it harder to maintain and improve. Has this gotten accessibility review?
Comment #50
Bojhan CreditAttribution: Bojhan commentedComment #51
andypostFrom this point I've started to think different, do we really need string translation in core?
D8 planned to be released with following (Gabor please correct me if I wrong)
- l10n_server client
- strings import
- internal string translation & community bit on strings to mark overriden string (which could help to select mostly used translations)
Also we have a nice l10n_client whick could be refactored to join force with core's string translation probably with a usage of Contextual module. We really need to refactor a way of string overrides - UI to overrides of LDO community provided strings
Actually string overrides looks absolute in context of downloadable translations from LDO and ability to upload custom strings
Comment #52
Gábor Hojtsy@andypost: looks like you want #1445004: Implement customized translation bit on translations to be in core? :) Good for us :)
@Bojhan: well, it is already in core. Question is why would we want to remove it. If we could rely on the community providing full translations for Drupal core and all kinds of modules (and/or the translation process to be as smooth so if you push to the community, it would almost immediately be reviewed/approved and available), you'd be able to run with just the localize.drupal.org translations feeding your site. Since that is not really reality, looks like we cannot really say we have a multilingual CMS if you need to do obscure things to add/change interface translations. We will have UI for all other language/translations things, so I'm not seeing a good reason to remove this one.
Comment #53
Gábor HojtsySo putting back the tag with that.
Comment #54
Bojhan CreditAttribution: Bojhan commented@Gábor I was guessing, we would not really have a discussion over this. I am not necessarily convinced that because there are a couple of modules, that don't have a translation - that we need to provide a full translation interface for them - and that core is the best place to do this. Anyways, I know these strategy discussions have always been futile on the i18n front - I have tried many times, so I will stop and just review UI's.
In terms of actual review, I definitely like a lot of the improvements over the messy l.d.o interface;
1) The screenshot in #48 is that a normal use case? It seems to show only, 2 strings? Isn't it common to find a whole lot, and also plenty of false positives? Aren't a lot of strings long?
2) The screen could make use of additional visual hierarchy, for example the language could be bold, or make use of extra spacing to denote its importance in the table.
3) How do specific interactions work, for example copy or reset? Like l.d.o or do they require a page load? If not, is this approved from an accessibility standpoint?
4) The operations are somewhat strangely placed and seem to attract to much emphasis. Could we move them to a upon hover contextual link placed on the right?
5) Filter and reset have equal importance, while filter is far more important. Can we make use of Drupal's blue button state, and or change filter into visually a link?
6) The fact that using the pager, triggers a loss of changed form data seems rather destructive. Something we are constantly trying to battle in core. Are there possible solutions for this?
7) The search form on top, could probably use some visual hierarchy. Putting an emphasis on the search box, and aligning the elements better. Clearly we do not have a good pattern for this in core, I hope with further iterations over the content listing we can provide you with one.
8) Is there a reason, we have repetition? Could we for example have just one "reset" but still visually (but not semantically) - and list all language translations of that one string?
This is all for now, I do wish to note that this probably requires accessibility review.
Comment #55
mbyrnes CreditAttribution: mbyrnes commentedHello,
Just summarizing my conversation with Gabor and a few points at the DrupalCon Sprint.
Please Note: I'm coming at this with experience using the Drupal 6 translation interface and managing training and confusion for translators comments related to that specific experience of managing large global websites with many localizers. I am probably making a few assumptions and I am not familiar with the inner workings of the code.
1) Regarding the (reset/ copy) - From the interface, this is unclear what action this is doing to me. Even after Gabor walked me through it, I still had a few comments and thoughts. First off, if the field is prefilled- why would i need to copy anything into it? In fact, they are sort of similar, if I want to copy the current base string into the field that shows up, that could also be akin to resetting it. I agree with @klonos on #21. As far as UI, I wonder if it may be more clear to see the actions that a translator could perform on a field be possibly in a drop down on the right of the field. As it stands now, copy and reset are both actions and should maybe be updated with more descriptive text. Reset may be more clear if copy wasn't also there.
From my understanding now:
copy = taking source string and moving it into the field
reset=when clicked removes changes on that one in line field so that when the page is saved the value gets returned. Akin to an 'undo' function
If these assumptions are true, it may make sense to think about alternative names of options here and making these a bit more clear what is exactly happening.
2) Special characters: I don't think that having a @count link hardcoded is the answer since this does seem like an edge case. If an @ term does show up, it would be helpful at this time to have the help text. I would extend this to other codeish looking strings too ie it would make sense to have some sort of clear indication or description that pops up a long with these specific strings that contain (%, ! and @). Whether when they appear there be some sort of indicator or colorful flag that the user could click into for more information. I think that this should be unobtrusive maybe some sort of help icon or when special characters appear in the search results then a "note on special characters ! @ and % could appear to explain. While users on localize.drupal.org may understand this specifically, I think it is a stretch that some site users would understand this code convention as exposed in the UI.
3) Plural fields - when a @ string requires plural fields specific to languages such as Croation, would it make sense to indent or give context for the 2nd line after the base string or some sort of indication that the multiple fields are required. I also agree that it would make sense to find someone who can test this from the perspective of using it who speaks a language with actual plural rules.
4) Written language vs language code: I do think that the printing of the language code and language in that column may generate issues down the line. For both long languages and for implementations that end up with localization/ country combined this could end up being difficult. Printing language code in the column because it may also match the browser code and perhaps adding a rollover with the text may help Responding to also #34 which discussed this issue as well.
5) Removal of summary screen: For those site managers who do have a need to view the status of a string or track down a string and viewing all the work on it (this is tricky with the current state of case sensitive search, but I know that is another issue), would it be possible to include some sort of view or way to see what others have done? I think that the crossed out language codes are useful for this type of audit or review, so maybe while the translation screen doesn't need it as the main use case is for one language, but could this be in some sort of advanced option area?
Comment #56
Kristen PolHere is some more DrupalCon Denver sprint feedback based on reviewing the design (first) and then reading through all the most recent comments.
Comment #57
pixeliteMy suggestions on the UI in #48:
Comment #59
Sutharsan CreditAttribution: Sutharsan commentedSummarizing #54 - #58 and my consclusions:
General
Filter area
Translation area
Research
Comment #60
Schnitzel CreditAttribution: Schnitzel commentedI hade a short Chat with Sutharsan in IRC. Here your conclusions:
- We have two usecases:
1st People which never used this interface
-> they need a lot of explanation how everything works, especially the placeholders, singular/plural
-> for this we suggest not to use inline editing and keep the current single edit screen.
2nd People which use this interface every day and have to translate a lot of strings, also into multiple languages
-> they don't need too much help and especially inline editing, which is a huge speed improve
Because we cannot handle both cases in Core, we agreed that we will focus in Core for the 1st Case and try to fix the 2nd Case in Contrib (probably with Ctools Ajax stuff, etc).
I'm now working on updating the current D8 Overview to provide a better UX there.
Comment #61
Gábor HojtsyHere is some competitive review.
Pootle:
PoEdit:
Webtranslateit:
Comment #62
Schnitzel CreditAttribution: Schnitzel commentedHad a chat with Gabor again.
He convinced me that we should provide the fast translation already in core.
- The not explaning Issue of Placeholders can be fixxed with some text on top
- The direct visibillity of the translations also adds a Translations Review possibility, where a Translator can see if the Translations are equal done.
- The Problem of not saved changes with a pager can be fixxed as Fields and Blocks are doing it: After the User changed something we show him a yellow bar, that he has unsaved changes
1
The same as already posted, with slightly changes:
- Context column added because of i18n
- added labels to the singular/plural
- moved textlinks
- renamed "reset" to "revert"
Pros
- everything in one place, everything visible
Cons
- bad using of space, SourceStrings are showed multiple times
- could get really huge
2
Inline Editing after clicking on an source string row
Pros
- less forms
- pretty clear, that is has to be saved
- better using of space
Cons
- no good overview of translations
3
Language mandatory for search
Pros
- easier interface
Cons
- no possibility to translate to multiple target translations
4
removed table for overview
Pros
- easier interface
Cons
- maybe a bit hard to get a good overview of source strings
I would suggest to use ether 1 or 4
Comment #63
droplet CreditAttribution: droplet commentedfew suggestion:
Comment #64
Schnitzel CreditAttribution: Schnitzel commentedNo, you need this because with i18n enabled you can have the same string in multiple context/textgroups. So you need a possibility to differentiate between the same strings.
it copies the sourcestring in the textfield. Also used in other systems: http://drupal.org/files/CompetitivePluralPootle.png
yes this is optional and depends if we will have a parser of Pluralforms like here: http://translate.sourceforge.net/wiki/l10n/pluralforms
But if we have a parser we should definetly use it and give the translator some hints which textfield is for which pluralform. Because some Languages have 6 (!) different Pluralforms
yes agree, this really also depends on the pluralform parser
I don't get this, so don't show the fieldlabel at all?
Comment #65
pixeliteMy feedback on screenshots in #62:
Comment #66
Schnitzel CreditAttribution: Schnitzel commentedJust had a short Skypechat with dania.gerhardt:
- She preferes Nr. 2 in favour of simplicity and cheerful interface, and also because she is used to this Interface from Drupal 6 and 7
- So the argument of a good overview of equal translations is not so important for her. Maybe we could put this functionality in a Contrib Module?
Comment #67
Kristen PolMy feedback on #62:
Overall, I would go with 4 or 1.
Comment #68
nonsieCompletely agree with the general comments made by Kristen Pol.
Since we are focusing on 1st case users I'd say #4 is the most usable at the first glance followed by #1.
Comment #69
SebCorbin CreditAttribution: SebCorbin commentedI would go for the 2 with all translations already shown.
So let's use this space to have a good overview (show all translations at first sight), with an option to hide all translations tables to have only source strings.
Although I'm not very fond of having a Save button by string, I would really like a fixed button that stays at the same position while scrolling and save all translations at once.
Comment #70
Sutharsan CreditAttribution: Sutharsan commentedLet me try reduce the number of options we have. A few things we seem to agree upon:
In this discussion I see people choosing for translating multiple languages at the same time. Is translating multiple languages at once an 80% use case? All translation tools I know of, including l.d.o, present one language at a time. We should not make things too complex by putting all the possible flexibilities into it.
Comment #71
gumanist CreditAttribution: gumanist commentedGeneral
1. We have missed context filtering (or I missed something why it was done)
2. Maybe it would be better replace 'Copy' text with smth like 'Fill'...
Option 1
1. It is very complicate to understand that you have edited anything.
But it could be fixed by adding color on edited lines + add something like 'edited' text.
2. The form looks too difficult
Option 2
As for me looks the best, because
- you see translations
- workflow is clear: you press edit when you need it and press save ones you've finished
But you don't see translations
Option 3
Having only one language is not enough for a lot of people
Option 4
Looks great for editing (instead of not clear when you edit something)
But difficult for overview
I would suggest to use something similar to Translations overview page http://drupal.org/node/261292 with marks
- Utranslated
- LDO translation
- LDO outdated translation
- Custom translation
And translation workflow from Option 2
Comment #72
Schnitzel CreditAttribution: Schnitzel commentedI disagree with 80%, because I see two Usecases for the Translate Functionality in Core:
The 2nd Usecase would be killed by having only 1 Targetlanguage and I see the 2nd Usecase happen more then 60% with our clients.
agree
agree
you probably mean "context" and I agree
If the Form opens via AJAX (Screen 2) we should directly provide a Save button. If no AJAX: agree.
as said in http://drupal.org/node/1452188#comment-5777686 we would use the same functionality as blocks and fields are using to mark Forms as dirty
How is the plan to add status informations about l.d.o Translations? There is #1445004: Implement customized translation bit on translations, but it does not really get status information from l.d.o.
Comment #73
Sutharsan CreditAttribution: Sutharsan commentedI'm not aware of any plans.
@all, I like to have your 80% use cases too. What is the minimum requirement. We want to come to a consensus and use the 80% use case as a guide line.
Comment #74
Sutharsan CreditAttribution: Sutharsan commentedNo, I left it out. Less than 1% of the translations have a context. I see no use case for filtering on context.
In the design I tried to limit the filter to its minimum requirement. The search string, no doubt, must be there. 'Language' too. The remaining options are:
1. Include (f.k.a. 'Search in'): [x] Translated strings, [x] Untranslated strings
2. Translation type: [x] Base translation, [x] Customized translation
(No 2. is introduced by #1445004: Implement customized translation bit on translations)
After discussion in IRC with Schnitzel, we chosen to keep 'Include' and not implement a filter for 'Translation type'. The latter can probably be missed. But we can put the translation type in a column of the results table.
I've redrawn the filter area separately, and leaving the results + form for later. Used core's blue button pattern for the buttons. Tried different layouts for the (un)translated checkboxes and this result looks best.
Comment #75
klonosJust a note here since we're discussing searching/filter on a list here, this issue might be of interest: #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages
I'm not saying we should wait on that issue or anything. Merely saying that if that one is accepted and implemented, we should revisit the filtering UI part and incorporate whatever is the outcome of that issue. So perhaps a todo/reminder note there?
Comment #76
Gábor HojtsyYeah, well, I thought we'll handle the translation UI here, and ignore redoing the filter for this issue :) I mean the translation UI in itself is well debated here, so why do debates for the filter at the same time :) Basically none of the UI plans mean any (or any substantial) changes to the filters, so we can debate those later, no? :)
Comment #77
klonosYeah, I thought that if/when we include a generic search/filter UI in D8 core, we'll surely file separate follow up issues for each page that we need to redo its filter UI. We'll just need to remember that this is one of those pages ;)
Comment #78
Anonymous (not verified) CreditAttribution: Anonymous commentedHi, one question:
Where do you place the "show (translations server) suggerences" in all those proposals? (as a translator I like most option 1 by Schnitzel , BTW).
And one idea:
As well, I would keep at top of my usability list the idea of having very clear in the UI when you are, as an administrator-translator user, about to erase with no backup your translations/changes on your site.
Just my 2c.
Gustavo.
Comment #79
Sutharsan CreditAttribution: Sutharsan commentedI've combined the various ideas in this thread in a new wire frame design. The primary user group are system administrators and translators with limited Drupal experience who are working on websites with up to five languages. The majority of the work to be done with this interface is to make changes to one or a few translations in one language at the time. A secondary audience of experienced administrators may not be fully served with this interface.
List all languages
List one language
Edit one translation
Edit multiple translation
Remarks
Comment #80
Sutharsan CreditAttribution: Sutharsan commentedSome background info with this design.
Comment #81
Schnitzel CreditAttribution: Schnitzel commentedsome feedback for the newest wirefreames:
- Overall I like them. It still gives the overview how things are translated and is still an easy overview.
- I would show the Language Column also when only 1 language is selected. From Usability point this could lead into confusion, when suddenly the user does not see the translation language anymore. What do the others think? Or maybe change the column Header "Translation" to "[language] Translation" ?
- Is there a possibility to delete translations or sources per item? Or is this only available by selecting only 1 item in the bulk operations?
- In the first screen it is not cleary visible that 1,2,3 items are the same source language (I only saw it after the 3rd look). Maybe add a bigger separator line between different sources as in my 1st screen?
- the sources column is missing? Or would you suggest to remove it? What happens when i18n is enabled and multiple sources have the same text? Or is this behavior also removed because of #1188430: Rip out textgroup support from locale module
- in the "Edit multiple translation" screen: shouldn't there be a "copy" link per plural form?
Comment #82
droplet CreditAttribution: droplet commented- As an admin & translator, I prefer EDIT it directly. "Choose and edit" is slow down my work.
- "In context: XXX", I'd move to top of strings.
Comment #83
Sutharsan CreditAttribution: Sutharsan commented@Schnitzel:
You are right, the current delete option deletes both source and all translations. I see no requirement to more fine grained delete options. So, we should have only one delete operation.
Agree, we need some visual separation here.
Text groups are removed from core. This column was not added by i18n, but was D7 core's own.
I expect this to be an overkill. Localization Server fill all plurals at once too.
@droplet:
You can do both. The edit link on the right for the one click solution and with three clicks you can edit multiple.
There are only a hand full of contexts, but if it is there it should make a difference to the translator. You are right in making it more visible.
Comment #84
droplet CreditAttribution: droplet commented@Sutharsan,
ONE and more than ONE click both are indirect way. We'd translate 100 or more than 1000 strings. I prefer "Edit multiple translation" screen for all cases (and ONE source string VS multiple langs translations). Or introduce EDIT and VIEW mode.
Comment #85
Gábor HojtsyI agree with @droplet, that this design introduces quite a bit of indirection which http://drupal.org/node/1452188#comment-5697524 nicely avoided. If we scale that down to one language only and fix the link placement that was debated, I think we have a great solution. Otherwise we clearly demonstrated we can debate this endlessly. If we don't want to move forward with this, we can just say what we have now in D8 is what is going to be released (which I don't think is good). We are debating this for 6 weeks with no convergence in sight. Newer and newer mockups are more and more different. Can we go back to the simple mockup from http://drupal.org/node/1452188#comment-5697524 and scale it down even more as discussed so that it keeps being simple?
Comment #86
Sutharsan CreditAttribution: Sutharsan commentedI had a long discussion with Gábor in IRC. We agreed we should continue on the path of with the #11 "seach & edit" design. The one-by-one editing has become the default in Drupal, but is a pain in this cases where a large numbers of small tasks need to be performed. The translation touch-ups we design for is such a case.
To reduce the complexity for inexperienced users, the 'all languages' option is removed and only one language can be edited at the time. For advanced users this is probably still acceptable.
For readability and scalability of the page the height of text areas is adjusted to match the size of the translation. Without translation the area is reduced to a text field as l.d.o does. When the field gets the focus the text area is restored. Operations links are only visible when their row is being hovered or when the translation is being edited.
The design needs accessibility review.
I have more advanced ideas for both the filter and the edit page, but will leave that for later or for a separate issue.
[edit] image added
Comment #87
Gábor HojtsyAll, right, let's build this! :)
Comment #88
Kristen PolGood job on #86! I definitely don't want to open this up for more debate, but I am wondering if/how the translators will know the overall status of the translation for a particular string since their are restricted to one language (e.g. the string "hello world" has been translated to fr/de/es and not pl/ar). I didn't see this explicitly addressed in recent comments, but I might have missed it. Perhaps this could be in contrib.
Comment #89
Gábor Hojtsy@Kristen: yes we are currently planning to make this screen more useful for actual translation, and on the way that kind of overview is going to be lost. Contribs will likely need to fill in that space I think.
Comment #90
Kristen PolThanks for the clarification... so now who's going to build it? I can test it once it's ready.
Comment #91
ershov.andrey CreditAttribution: ershov.andrey commentedChanged Filter Translatable Strings form
Comment #93
Sutharsan CreditAttribution: Sutharsan commented@ershov.andrey, thanks for kicking this off :)
Some remarks. No urgent need for code changes, only UI considerations.
The search fields above the select lists was on my mind, but not yet in the design. Looks good. It give the search field the priority and attention it deserves. But may need the submit button to be next to it.
Search option 'Translation type' attracts a too much attention when presented as checkboxes. I'm even wandering if we should include it at all.
We need to think what the search form should look like if 1. only one language is available, 2. only the system language is available.
Looking forward to more of your code ;)
Comment #94
Schnitzel CreditAttribution: Schnitzel commentedokay, not that I would prefer this UI but I agree that if we don't decide we will never find a solution.
1 question:
What will you show with the "translation information" link? Is this a general information or a dedicated depending on the placeholders in the source string?
If it's a general why not showing this at the bottom or at the top of the whole page?
And maybe show this link below the sourcetext, because this is the area where a person would have a question lke :"what is '@count' for"
Comment #95
andypostAnother problem with this filter that checkboxes give us a 4 states each but actually there's only 5 :
1 no filter,
2 filter untranslated
3 filter translated (hides customized checkboxes)
4 filter translated customized
5 filter translated not customized
Comment #96
Sutharsan CreditAttribution: Sutharsan commented@andypost,
I have not detailed this yet, but context specific would be best. I moved it out of the bottom because it can easily be overlooked when the page is long and requires a lot of scrolling when te page is long.
The links are combined on the right for consistency. Links are only shown on hover and when the row is in use by the translator, having links pop up 'all over the place' is not desirable. The content is not only related to the source, it will also contain information about the plurals (if applicable), and I expect the amount that much text that it requires the full with (2 - 6 lines).
Good catch. The no checkboxes selected state is an oversight. Lets go back to fieldsets (and wait for #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages to come with a generic pattern).
Comment #97
andypostI found another confusing moment!
When we disable all languages except one (SL site) screen1
We still have System language in filter list... screen2
Checkboxes purpose:
Untranslated strings
indicates us to make search withinlocales_source
Translated strings
to make search inlocales_target
suppose "translation information" -
location
field oflocales_source
Core places all action links at the top of acting element, the only possible exception done for contextual links which are "hovered"
Comment #98
andypostLanguage list (system-english disabled)
string translation
Comment #99
Gábor HojtsyWhat do you suggest to explain System English better? :)
Comment #100
andypostI think Internal(System) or System(Source) makes more sense then we have for now
Comment #101
Gábor Hojtsy@andypost: I think Drupal 7 has "Built in English". I think its better to somehow expose that it is English. Anyhow, I don't think that belongs in this issue. It is not really a question of how it is filtered, but more a general naming discussion. It was introduced as System English when we introduced deletability for English (#1266318: Make English a first class language). There seems like Clemens also suggested "Internal (English)". I'm not sure we want to debate this here, unless we have an instant favorite.
Comment #102
ershov.andrey CreditAttribution: ershov.andrey commented#91 plus translations table changed to plain form with proper validation and submission.
Comment #104
Everett Zufelt CreditAttribution: Everett Zufelt commentedI can give this UI an accessibility review if a demo URL and credentials are provided.
Comment #105
Sutharsan CreditAttribution: Sutharsan commented@ershov.andrey,
Comment #106
ershov.andrey CreditAttribution: ershov.andrey commentedFixed almost all known bugs, added table UI to form, deleted System language from languages select list
Known bugs:
Comment #108
Sutharsan CreditAttribution: Sutharsan commentedComment #109
Gábor Hojtsy@ershov.andrey, @andypost: are you still working on this?
Comment #110
rvilarFixed all bugs, theming issues and copys.
Comment #112
Sutharsan CreditAttribution: Sutharsan commentedSmall steps, but we are moving in the right direction :)
* In Google Crome there is a large gap between the buttons and the search field
* Purposely I did not include the version data. The content is inconsistent (either the URL the string was found or the module and version it was found in) and (in case of the module version) not relevant to the translator. Pls remove
Now it is time for the operation links and JS dynamics.
I'll make a proposal for the "translation information".
Comment #113
Sutharsan CreditAttribution: Sutharsan commentedComment #114
ershov.andrey CreditAttribution: ershov.andrey commentedUnfortunately, I'm busy right now. I hope, I'll join as soon as I can.
Comment #115
perusio CreditAttribution: perusio commentedPicking this up.
Comment #116
perusio CreditAttribution: perusio commentedThe placement of the Filter button is different in each browser. This needs fixing.
Distance between textfield and button:
In Iceweasel/Firefox the button placement is misaligned. See attached images:
Comment #117
Gábor Hojtsy@perusio: right, fixing those would be great. Also, as Sutharsan pointed out, the location information should be removed; it is mostly useless and can be very different. Thanks for taking this on!
Comment #118
perusio CreditAttribution: perusio commentedOk. Reinstated English and removed the ugly absolute stuff. Now it works with
width
andfloat
using the#suffix
and#prefix
attributes of the form elements in question.There's some issues still. Chrome places more space between the search box and the buttons than FF or Opera. There's some oddity here. Perhaps is related to the client stylesheet. The calculated style seems to be similar though. I have to look further into this. I'll reroll the patch this evening.
Comment #119
droplet CreditAttribution: droplet commentedstyle with "position: absolute" isn't a good pattern.
Comment #120
perusio CreditAttribution: perusio commentedYes indeed. That's why removed it. Current CSS:
Comment #121
perusio CreditAttribution: perusio commentedHere's the patch with the new mods. Please bear in mind that up until now I'm ignorant of i18n stuff in D8. If there's a roadmap, please point me to it. Thanks.
Comment #122
perusio CreditAttribution: perusio commented@Everett Zufelt I can, if you wish, setup a host with D8 on my small Linode and give you access for you to evaluate the acessability of the interface. Let me know.
Comment #123
Everett Zufelt CreditAttribution: Everett Zufelt commented@perusio
That would be great. Can you please suggest a couple of user stories (a couple of sentences each) to guide my tests? I can do the testing on Friday.
Comment #124
perusio CreditAttribution: perusio commentedRemoved the
width: 100%
for the dropdowns. it gives problems on firefox.Comment #125
perusio CreditAttribution: perusio commentedAssigning this to me.
Comment #126
perusio CreditAttribution: perusio commentedChanging status.
Comment #128
perusio CreditAttribution: perusio commentedThis needs to be reworked from the ground up. I just made some cosmetic changes, which being important, don't contribute to test passing. I'll look into it this next weekend.
Comment #129
andypostThe loginc begind this quiery is mirrored into UI!
Current query-builder should follow new UI login too.
Suppose we use:
1) search in locales_source when System language selected
2) always search in locales_target with different filters
Comment #130
Gábor Hojtsy@perusio: are you still working on this one? Would be great to make some progress here.
Comment #131
perusio CreditAttribution: perusio commentedHello Gábor,
If not before at the code sprint at Drupalcamp Lyon. I had any time to work on this lately.
That's why sprints are important IMHO. You're forced to just do it.
Comment #132
Gábor HojtsyAnybody else interested in working on this then?
Comment #133
Gábor HojtsyOk, since there is nobody to take this on, here is a reroll/rework.
1. I dropped all changes related to the filter form UI. I said above we should focus on the editing table, its enough of a pain.
2. The patch had inconsistent use of locale_translate_* and locale_translation_*, used the former since others use that too (eg. import/export).
3. Changed the query builder to include langcode in left join and always search in both source and translation if a search string was provided. This balances the loss of searching in source text only (which did not make sense in this UI since you don't know which language to save the translation to).
4. Renamed the _seek_ functions to _filter_ appropriately. I think their names make a lot more sense now. Built in security filtering to the session handling code.
5. Used the editing table code as-is from the previous patch. The form validator did not have langcode but it used it, and the submission code had broken whitespace, fixed those.
6. Dropped the operations columns for now, we can add them back later. This is already a huge improvement.
7. Did not work on fixing any tests, but on visual testing, all filters work, the translation works, etc. Will definitely fail with tests but please review.
Comment #135
perusio CreditAttribution: perusio commentedLike I wrote above I'll pick this up next sunday the 27th of May.
Comment #136
Gábor Hojtsy@perusio: perfect, here is an update with one two of the tests fixed (uninstall en and fr). Note that instead of editing a string directly, now you can filter to that string via search and then edit it on the table. See the new code in the interdiff. The rest of the test fails should be possible to fix with similar ways. I will not work on this in the coming weekend, so please pick it back up :) I think better focus on test fails and then getting this in as-is with followups for further functionality (filter layout rework, JS operations, etc), before we reach 200 or more comments and everybody gets way too tired of the whole thing. We already lost several people here possibly :/
Comment #138
Gábor HojtsyRerolled same patch since it did not apply due to Kernel patch changes. Should still fail tests about the same way. Just a reroll for now.
Comment #140
droplet CreditAttribution: droplet commentedQuick question.
- does it remove "ALL Language" option in Language filter ?
90% tests error on Language filter "ALL"
"Failed to set field langcode to all"
Patch
- use PagerSelectExtender
- fixed few tests
Comment #141
Gábor Hojtsy- Pager class needs to be referenced differently. This made the uninstall tests fixed again, like above.
- Language field changed to 'langcode' from 'language', fixing tests for that. Also, untranslated indicators are not used anymore, fixing that too to filter to untranslated instead. Works just as well :) These should fix the import test case.
Comment #142
Gábor Hojtsy@droplet: ha! Looks like you fixed some more tests than I did and also fixed the pager. Thanks. Looking for those test results :)
Indeed, the "All languages" option is purposefully removed, since the language selector governs what language values you have for translation in the table. For simplicity, we don't have a mixed language translation table. Contrib will be able to do that :)
Comment #144
Gábor Hojtsy@droplet: are you going to work more on this issue? You can take my changes from http://drupal.org/files/interdiff_315.txt for the 'all' case being used to check untranslated strings. Similarly can be applied to other places where 'all' seems to be used, which looks like a recurring pattern in the failures now.
Comment #145
droplet CreditAttribution: droplet commentedIt's all today :) will itbring down half errors ?!
- Remaining errors are related to edit form ( admin/config/regional/translate/edit/ )
( I'm rarely write tests, need to study the DOC first, LOL )
Comment #147
droplet CreditAttribution: droplet commentedRemark: I think we need a translatable langs counter check on locale_translate_screen() rather than this.
Comment #148
Gábor HojtsyThe changes in the interdiff look good except:
Whitespace issues. The newline is not needed, the space after isset( should not be there.
Otherwise feel free to add a 'default' on each options, I'm surprised select lists don't have defaults, I think I solved this problem earlier by assigning defaults, no?
We are losing the checks for Croatian stuff here. You should download the page for Croatian too and check the strings to retain the tests.
Comment #149
droplet CreditAttribution: droplet commentedDrupal\locale\Tests\LocalePluralFormatTest
- Leave ONE error. I have no idea.
the UI only shown 2 plural to manual inject string, is it a known bug or what I missed ?
Drupal\locale\Tests\LocaleTranslationTest
- testStringTranslation failed
- No "delete" link any more ??
Basically only 2 test function still have errors now. anyone take care of it?
Comment #150
Gábor Hojtsy@droplet: for delete, if you empty the field for the translation, it will delete it (an empty translation for something does not make sense, it is used in the form as well to designate untranslated strings, right?). I don't understand your first question before this "the UI only shown 2 plural to manual inject string".
Comment #151
droplet CreditAttribution: droplet commentedsee images:
It's same langcode, but 2nd screen missing 2. plural form.
D7 "Del Link" removes both source & translations
Comment #152
Gábor HojtsyIndeed, if it is the same language and the plurals are not showing up consistently, that looks like a bug.
For the delete feature, we are not doing cross language edits here, especially not any changes to sources, so we should not loose the source string in any case. The updated functionality allows to remove the translation only for the language picked for the table, that should be tested.
Comment #154
droplet CreditAttribution: droplet commentedOh. for some reason. I go an SQL error in LanguageUILanguageNegotiationTest. Can't help to fix this part.
How about you, testbot ?
Comment #155
Gábor HojtsyIs that happening on your test system? Does not seem to happen in testing above.
Comment #157
droplet CreditAttribution: droplet commented@Gábor,
Seems like my virtualbox cached the files ..etc
Plural form
I can reproduce same bug with old UI:
Comment #158
Gábor HojtsyCatalan would need to have more plural forms? I believe Catalan uses two.
Comment #159
Gábor HojtsyIn other words, I don't think that looks like a bug for Catalan at all.
Comment #160
droplet CreditAttribution: droplet commentedSorry. wrong screen. tested "Croatian" (hr).. same bug. Is it a hard list for the plural forms ?
EDIT: Okay. I found the files
\core\modules\system\tests\upgrade\drupal-7.language.database.php
Comment #161
Gábor HojtsyUntil you import a .po file for a language, the plural form will not be known. If the screenshot is from the update tests, then the file you qouted is relevant, otherwise it is not.
Comment #163
droplet CreditAttribution: droplet commentedComment #165
droplet CreditAttribution: droplet commentedI found myself never use translate UI before.
Dig deeper and found a new bug: #1623564: Wrong text at translation UI
Comment #166
droplet CreditAttribution: droplet commentedBetween #145 - #165:
- Fixed all tests.
- Set Language filter to "
<none>
" if no translatable language enabled.- Fixed spelling "Sigular" -> "Singular"
- Also included bug fix from #1623564: Wrong text at translation UI
- Source String & Translation columns split into 50%/50% of the width
- Fixed Filter form space issue. Now more close to others form in Seven.
- ..etc
Please review :)
Comment #168
droplet CreditAttribution: droplet commentedComment #169
Schnitzel CreditAttribution: Schnitzel commentedApplied to my drupal 8 testinstallation and patch looks good!
Tested creation of translations, editing, etc.
Filters also worked, tested the "non-customization translation" filter with setting customized in the database to 0.
Also tested when no translatable language is available.
found a small thing in the patch:
This should probably be:
(is fixxed in the new patch)
I also updated the code to implement the "dirty" marking features as shown in #86.
I'm using own code, which is in some parts copied of the tabledrag.js, if we ever make a more global implementation of dirty marking, this would be good to be refactored.
As discussed with Gabor we will not implement yet the more fancy functionalities like "copy source", "undo changes", etc.
Comment #171
Schnitzel CreditAttribution: Schnitzel commented#169: 1452188-new-lang-ui-169.patch queued for re-testing.
Comment #172
Schnitzel CreditAttribution: Schnitzel commentedupdated patch with two accessibility features:
- showing the language in the translation column
- hidden label for the translation textareas
Comment #173
Gábor HojtsyThis is a quick accessibility test report of the patch. We discussed adding the above two things as we realized we need to provide more context for text to speech browsers. Here is the navigation path that I followed to show that information is available as needed. My navigation path was (starting from one of the translations accidentally and then hitting a bug with step 8 where it did not announce the text - it normally does, as the later steps show, it was a local bug in Chrome Vox that I used for the testing).
Note the tool allows you to move "down to the next thing" or "into the next thing". People can easily reproduce this by installing Chrome Vox (a Google Chrome extension) and then navigating through the page with Ctrl+Cmd+cursors.
PS. I recognize the irony of posting a .mov without video, audio only.
Comment #174
Schnitzel CreditAttribution: Schnitzel commentedduring listening to the video without video (;)) we realized that currently both "original" and "source", and also "text" and "strings" are used.
Because Source and Strings is more often used, we decided to use this too.
attached patch fixxes this (code comments and UI text), for the help text we decided to wait with this, we have to make a whole help text review for all parts of locale/language module
Comment #175
droplet CreditAttribution: droplet commented$filter_values contains language name ?
The dirty change make me sick.
1. add "a" into textarea
2. remove "a"
This is no changes. (but the UI said its changed)
It should start with locale ID and use find().
remove/rename tabledrag (.ajax-changed)
tagging JS, @_nod may interested :)
Comment #176
Gábor HojtsyYeah, feedback from some people using it would be good. The change handler works elsewhere the same way as you described. Whether it is Views or the field UI, if you change something and then you change it back, it will still tell you that you changed it. Other UIs where we have change handlers are less often used. We don't have a change handler in the node form for example, because we assume people understand it does not save itself. We do have change handlers at places like the field UI.
Comment #177
Schnitzel CreditAttribution: Schnitzel commentednope, unfortunately not, it only contains the keys:
Attached a patch which fixes the classes and also the JS find. but I'm not sure if I'm using the ID you would suggest.
also renamed locale.js and locale.css to locale.admin.js and locale.admin.css.
Comment #178
Schnitzel CreditAttribution: Schnitzel commentedComment #180
nod_Thanks droplet, you're right, I'm interested.
If I'm following
#edit-strings textarea
is likely to match a lot of textarea, in that case we should be using event delegation as the current way of doing things will quickly slow things down. I'll make some time to work on the JS bits, hopefully tonight.Comment #181
droplet CreditAttribution: droplet commented@nod_, can you also fix the color hex, to lowercase. thanks :)
Comment #182
nod_Here is the rewrite for local.admin.js profiling shows delegation takes half the time of the previous behavior (half of not much though :) and it'll scale to however many textarea are displayed. Hopefully it's simpler to understand too.
Var declarations might seems weird, we don't have standards for those yet if you want to ague about this please go to #1483396: [policy, no patch] JavaScript coding standards for variable declarations and let's find a generic solution for that.
I fixed the CSS droplet mentioned as well. My interdiff-foo is weak, the changes are localized in the previous areas: local.admin.js and local.admin.css.
Comment #184
nod_Comment #185
Schnitzel CreditAttribution: Schnitzel commentedthanks to @nod_ for the fixxes, looks like the patch did miss some parts, here a rerolled patch which should work to apply.
also found, that
ajax-changed
should be used, which removes the ugly border of the abbr tagComment #186
Schnitzel CreditAttribution: Schnitzel commentedComment #187
droplet CreditAttribution: droplet commentedGreat!!
Should it use LABEL? (Only use label for form controls)
also, can it remove the DIV layer and move the #id to TD. Good for theming too.
Comment #188
Gábor HojtsyIt was a form item in Drupal 7 too. See attached. I think it logically makes sense for it to be a form item (it pairs up with the input field) plus it also gives us the invisible label, which is standard on forms.
Comment #189
andypostlet's rename this to locale_translate_page() to follow core's pattern
Comment is useless
Should we change this #attached to allow aggregation?
I think
<br />
should be changed to<br>
because doc-type now is not xhtmlComment #190
nod_As andypost pointed out, the JS needs a detach function. I've namespaced the events to make it easier to unbind.
(not rerolling the patch. With D8MI I end up messing it up every single time)
Comment #191
Schnitzel CreditAttribution: Schnitzel commentedthanks for the feedback, new version of the patch:
- renamed locale_translate_screen() to locale_translate_page()
- using #attached
- removed comment
- using
- new version of JS by @nod_
Comment #192
Schnitzel CreditAttribution: Schnitzel commentedComment #193
droplet CreditAttribution: droplet commentedIt should be
<br />
. It has an issue about this topic (sorry. can't find it). But GREP all sourceyou'll see the answer :)
EDIT:
#1388926: Remove all references to "self-closing" void elements in core
@#188
Label everywhere is validated code. But I don't think this is semantic markup.
Comment #194
Schnitzel CreditAttribution: Schnitzel commentedJust did a short Usability Review with @Marinero
It worked overall, but it had some clitches.
The Task was:
Translate the "No front page content has been created yet." string to Spanish.
He went to the User interface translation page, searched for the string and realized with the Table Column Name "TRANSLATION FOR ENGLISH" that he would translate to English. To get rid of this, he changed the language of the Drupal to Spanish and went again into the User interface translation page, but was surprised that it still shows "TRANSLATION FOR ENGLISH". So he went in the form and after some clicking around he saw the "Language" Dropdown, changed to Spanish and was finally able to translate the string.
Conclusion:
After translating the string, the left the cursor in the textfield and scrolled to the safe button, but with trying to click the button, the change() handler is called and it shows the warning bar on top, which then moves the whole form down and also the button, so the button wasn't clicked.
Conclusion:
The next task was to review existing translations, imaginated he is on the 14th page and change some existing translations. After clicking saving, he is back in on the first pager page and has to use the pager again to go to the 14th page. Using browser back (which is faster) could lead into strange behaviors, with overwritten existing strings, etc.
Conclusion:
will wait for some feedback and will start implementing the conclusions in couple of hours
Comment #196
LoMo CreditAttribution: LoMo commentedI've done another set of usability tasks with @Schnitzel, as in #194. I'll summarize in the same format:
Task 1:
Translate the "Add content" string to German (looking at the "Navigation" menu block on the home page).
It had been a while since I'd done string translations, so it took me a moment to find the right place to look. Of course I was also experimenting to see if there were any new "tricks" implemented. And trying to pretend I was newer to Drupal admin/site-building than I really am. Soo.... I started by looking at the "configuration" for the block. Could it be there might be settings there? Nope. How about if I follow the link; anything useful there? Nope. Hmmm... Let's look at the "configuration" link in the toolbar then. The "Language" link jumped out at me before I saw the "User interface translation" so I clicked on it first, which did allow me to get to the translations (through clicking on the link in the Interface translation column), but there could be some improvements to the interface and functionality…
Conclusion:
On
admin/config/regional/language
, there is text which says "Interface text can be translated." This is not currently linked to the translations admin page:admin/config/regional/translate/translate
and providing this link might be helpful.Conclusion:
In the "Interface translation" column, there are links to the translations for each language… at least they appear to be links to translate each language, but in fact they all go to translating from English to English. If a site has, e.g. German, enabled, the link for German translations the “Interface translation” column should be to the "User interface translation page (
admin/config/regional/translate/translate
) page, but with the "Translation language" already set to German (or whatever language is clicked).Conclusion:
The filter system allows us to look for a string and filter by "Search in", but the options could be more clear or at least more consistent. Currently the options are:
We should change the third option to "Only untranslated strings" to be consistent.
Conclusion:
On the "User interface translation" page, when filtering by language and "Only translated strings", there is another selector which becomes visible: "Translation type". This selector has three options:
If you don't already known what the "non-customized translation" means (if you don't know that you can import translations), you won't know what these options mean. Since I'd already made some custom translations, I was able to understand what this meant by changing the settings and seeing the results, but some "help text" more clear options for the selector (i.e. "Imported translations" instead of "non-customized translations") might be more clear.
Comment #197
Schnitzel CreditAttribution: Schnitzel commentedUpdated version of the patch, thx to @Marinero and @LoMo for the Usability tests and again @LoMo for some Code contributions!
Changelog:
Comment #199
Schnitzel CreditAttribution: Schnitzel commentedgrml, had some old tests in here, now it should work.
Comment #200
Schnitzel CreditAttribution: Schnitzel commentedjust had a IRC chat with @nod_ and he ponted me that we should use
closest()
instead ofparents()
, this is fixxed now.Comment #201
nod_Actually you can make that simpler, since you want to manipulate form and not the table you can remove the delegation and just bind to the form so that you'll go from:
to
(It's the same as the initial code, I just remove the extra
table
parameter from the .one() call)Comment #202
droplet CreditAttribution: droplet commented#1. (will testbot warning it too ?)
#2. can it rewrite to
$sql_query->extend('Drupal\Core\Database\Query\PagerSelectExtender')->limit(30);
I think no errors ?
#3. cached it ?
#4. double click included "*" ? might be add a own layer to strings ?
#5. wrong labels here too.
is it better if it use CSS for the padding ?
#6. expected result?
#7. (NOTHING) New separated issue I think ?
Comment #203
droplet CreditAttribution: droplet commentedalso
" "
at "Source string" side ?Comment #204
Schnitzel CreditAttribution: Schnitzel commentedthx for the Review @droplet and @nod_
Here a new patch
Changelog:
- fixed JS as suggested by nod_
- fixxed notices on string form if no language enabled
-
$sql_query->extend('Drupal\Core\Database\Query\PagerSelectExtender')->limit(30);
instead of$sql_query = $sql_query->extend('Drupal\Core\Database\Query\PagerSelectExtender')->limit(30);
does not work, it shows all strings without pager-
$path = drupal_get_path('module', 'locale');
is now used for caching- #4 => Good point, found a way to fix it in Webkit, but not in Firefox he all the time selects also the *
- #5 => this is quite hard, because there is no possibility to add attributes to 'item' form elements, and giving all form-type-item a padding (also the one which are not singular/plural) I think is a bad idea.
- #9 => fixxed
Some responses (by Gabor and me):
- #6 => what you actually mean? that it is twice there? yes, because the second one in is another context (but it is actually a bug in the datepicker.js, so we will open another issue)
- #7 => this comes from en empty source string, which shouldn't be the case, but another issue.
- #8 => this is how it should be, the source string should not be touched at all.
Comment #205
Gábor Hojtsy@droplet: opened a new issue at #1634190: Long month names in locale.datepicker.js not using context properly for the long month name problem (your #6), will get someone on it :)
Comment #206
droplet CreditAttribution: droplet commented- #6 => what you actually mean? that it is twice there? yes, because the second one in is another context (but it is actually a bug in the datepicker.js, so we will open another issue)
I was thought it merge into one row.
- #8 => this is how it should be, the source string should not be touched at all.
But if the source string have 2+ spaces. UI only display ONE space. Translator will trust it as ONE space only.
and browsers will remove beginning & ending space, 2+ space between words
Orig string:
<-beginning SPACE |2+-> <-2+| SPACE ending->
UI:
<-beginning SPACE |2+-> <-2+| SPACE ending->
Comment #207
Schnitzel CreditAttribution: Schnitzel commented??? no, this was never the idea, we combine only singular/plural in one row, what you showed us is actually a bug and will be fixxed with http://drupal.org/node/1634190
This was the case in Drupal 6, and Drupal 7, so it has nothing to do with this Issue. So please create another issue for this.
Comment #208
Nick_vhApart from the 0/19 link that causes confusions (not clear enough) and was made clear that it needed to be reverted at the Drupal Dev Days sprint, this patch looks good to me! Well done!
Comment #209
droplet CreditAttribution: droplet commented@#207 Schnitzel,
nps. new issue: #1635160: Take care of source strings SPACE in Translate UI
Comment #210
Schnitzel CreditAttribution: Schnitzel commentedokayyyy, somehow was the patch pretty wrong, this is fixxed now and contains only the stuff it should do.
also removed the separate links in the language list page, because it confused some people.
go testbot go
Comment #211
aspilicious CreditAttribution: aspilicious commentednewline needed
add a newline at the end of your files
13 days to next Drupal core point release.
Comment #212
Schnitzel CreditAttribution: Schnitzel commentedthanks aspilicious!
fixxing "No newline at end of file"
Comment #213
Bojhan CreditAttribution: Bojhan commentedAlright so I gave this a relatively quick usability review by show-tell with Gabor and Schnitzel. In general I think the patch looks good, its definitively simplifying big parts of this interaction. I noticed two major problems;
1) The "click the save button" notice is now displayed below the table, this is a big issue - because people do often forget to Save and just the yellow communicates nothing to most users. A bit of white space, would allow for it and fix this quite easily.
2) The filter/search functionality is a bit awkwardly designed. People don't notice critical functionality, but from my point of view this should be fixed more broadly later. I imagine we fix how we do filters in core, then apply it here or visa versa. But this should definitely be a follow up.
Other than that, this looks ready to go!
Comment #214
droplet CreditAttribution: droplet commentedMissing this one ? "Untranslated " -> 'untranslated '
miss aligned.
maybe use prop() ? any thought @nod_ ?
Comment #215
Gábor HojtsyWhitespace issues.
File summary comments should be on one line!
Not related to this patch. :/
Also, no newline at end of file at the end.
Comment #216
nod_Actually I still need to go through translate.js, talked a bit about it yesterday with Schnitzel I'm hoping to simplify it, seems complicated.
But yes, here .prop is what should be used.
Comment #217
Schnitzel CreditAttribution: Schnitzel commentedwell, right, okay I removed it :)
Changelog:
Comment #218
svenryen CreditAttribution: svenryen commentedI applied the 1452188-new-lang-ui-217 patch from Schnitzel to the d8 branch.
I was able to load the interface for content translation, as well as search for strings.
I verified that the translated strings appeared on the installed site and I also
successfully translated both singular and plural forms of a string.
To confirm it shows up as intended in the interface, I created an article and then i posted one comment, followed by another comment. I was able to see both singular and plural versions of the string.
I added multiple languages and added various translations successfully.
Comment #219
Schnitzel CreditAttribution: Schnitzel commentedreroll because of PSR-0 patches which went in.
Comment #220
Schnitzel CreditAttribution: Schnitzel commentedand this patch will apply when #1471432: Rework language_list(), let people use more special languages is commited
Comment #222
Schnitzel CreditAttribution: Schnitzel commentedohoh, the #219 was a renaming issue of me, this is the same patch as in #217 which still applies even with the recently PSR-0
Comment #223
Gábor HojtsyNo newline at end of file still.
Comment #224
Schnitzel CreditAttribution: Schnitzel commentedgrml...
fixxed No Newline
Comment #225
Gábor HojtsyRTBC since the previous came back green and this is just a newline change :)
In summary, there is 4 months of development in this on several sprints including Denver and Barcelona. It had multiple users testing it and providing feedback (3-4 just here in Barcelona alone), various lead developers on it throughout, we did accessibility reviews, we did UX review with Bojhan, extensive JS review with _nod, and everybody agrees all around that its a better solution then we had before. There are likely still ways for improvement, but its a huge step already, and we should move on with followups now.
Comment #226
webchickSchnitzel was kind enough to walk me through this patch and the old 7.x UI. GREAT job on this folks!!
COMMITTED AND PUSHED TO 8.X WOOO :D
Can we please get some follow-up issues to apply these nice UI patterns elsewhere in core's admin UI?
Comment #228
aspilicious CreditAttribution: aspilicious commentedComment #229
Gábor HojtsyCrosspost I think.
Comment #230
Bojhan CreditAttribution: Bojhan commented#1636652: String translation filter UI
Comment #231
Bojhan CreditAttribution: Bojhan commented#1636652: String translation filter UI
Comment #232
Schnitzel CreditAttribution: Schnitzel commentedFollow up:
#1636992: form.js' formUpdated event is unreliable/incomplete
Comment #233
Gábor HojtsyWe should have a changelog entry for this as well as a change notice node. Anybody up for those?
Comment #234
Gábor HojtsyAdded change notice node at http://drupal.org/node/1647466, attaching changelog patch suggestion. If it looks good, let's get it in.
Comment #235
Schnitzel CreditAttribution: Schnitzel commentedlooks good for me!
RTBC if it gets green ;)
Comment #236
webchickCommitted and pushed to 8.x. Thanks!
Comment #237
Gábor HojtsyDone, moving off sprint. Who wants to open a followup or two for improving the UI even more (eg. operations links, highlighting placeholders, etc). Would be good to have a list of all followups in one place too.