On the translation form being ported, most of the CSS and JavaScript code written for the previous Drupal 7 version still works, but not entirely. For instance:
- CSS issues (the markup slightly changed): mostly suggestions.
- JS: dialog boxes opened when you click on action links (small icons), unlike D7 version. The "decline" action might not be functional.
Module: l10n_community
URL: group/GROUP_ID/translate (you first need to activate a language and to create a translation group).
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3320795-alignment-fix-Screenshot_20240307_175354.png | 46.88 KB | shmy |
| #12 | d7_version.png | 135.43 KB | teebeecoder |
| #10 | alert.png | 68.78 KB | fmb |
| #10 | new.png | 78.06 KB | fmb |
| #10 | old.png | 76.61 KB | fmb |
Issue fork l10n_server-3320795
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
fmb commentedAlso, a suggestion textarea with an .error class should be visually emphasized (or maybe this is an issue with the theme). Currently nothing happens.
Comment #3
fmb commentedAlso, can we get rid of the
clearfixclass in TranslateForm::translationListItem()?Comment #6
fmb commentedOops I honestly do not understand what is happening here, but there is an issue with the merge request #1. No commit can be seen. @TeeBeeCoder is it fixable?
Comment #7
ptt-homme commentedHere we are @FMB. Sorry, I don't know why the commit was missing, but I pushed it back.
For instance, I styled the filter form using the style currently used on the localize website. As I said, it would be nice to use CSS modern implementation in a second time. When all the decisions will be made for UX/UI, I'll adjust it to a more modern CSS code.
Comment #8
ptt-homme commentedComment #10
fmb commentedThanks @ptt-homme!
Is it just me, or the D9+ version:
still does not look exactly like the D7 version:
Also, when I click on the "Translate" icon, I get this alert box, which does not appear in the D7 version:
Comment #11
teebeecoder commented@FMB,
I'll check it!
Comment #12
teebeecoder commented@FMB,
I found a way to reproduce the alert box on the D7 version, please see attached file. I think that the behavior is the one expected, but I'm not sure about the UX.
Steps:
- go on https://localize.drupal.org/translate/languages/fr/translate?project=dru...
- click on the pen
- see the alert box
Comment #13
fmb commentedIndeed, but no alert is triggered when the field is "empty", i.e. when it contains the string "<New translation>", unlike the D9 version. I guess there is something wrong with this string.
Comment #14
shmy commentedI confirm that the UI / UX differs as described in #10 + #12 + #13. Already found and fixed the #13 issue locally. Will continue soon'ish.
Comment #15
fmb commentedGreat @shmy, I am looking forward to seeing what it was!
Comment #16
shmy commentedAlignment should be ok now:
How do i reproduce the .error class as mentioned in #1? I've seen how it looks on D7 (when adding the class manually) but would be nice too know how / when its set.
Comment #17
fmb commentedIt happens when the source string contains an argument, such as "%page" in "404 error: %page not found." and you submit a suggestion without said argument.
Comment #20
shmy commented:face_palm: While working with this old code base and seeing so much code copied from 7.x-1.x it didn't cross my mind that there could a form validation implementation and instead i did a quick grep for any
'error'string.Anyway i've addressed the above mentioned issues.
Comment #21
shmy commentedBy the way the in the latest commit of the MR 46 i've reverted #3396437 partly but omitted the revert for the submissions.js file because its part of l10n_statistics submodule. Not sure how to handle this (re-opening the issue? new issue?).
Comment #22
fmb commentedYou can handle this in a new issue.
Comment #23
fmb commentedThank you so much for your work @shmy, much appreciated!