Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make character limit less restrictive #3662

Closed
Fat-Zer opened this issue Apr 3, 2020 · 7 comments · Fixed by #4862
Closed

Make character limit less restrictive #3662

Fat-Zer opened this issue Apr 3, 2020 · 7 comments · Fixed by #4862
Assignees
Labels
enhancement Adding or requesting a new feature. ux Issues related to user experience.
Milestone

Comments

@Fat-Zer
Copy link
Collaborator

Fat-Zer commented Apr 3, 2020

Currently if a translated message is hitting character limit in the text input, weblate prevents new character from being input. It's quite inconvenient if some restrictive string length is defined and you are trying to fit translation into into it. Basically, you just have to copy the translated text to external text editor or a comment field, because you need extra space to shuffle words around or rephrase the translation.

I suggest (instead of forbidding input of extra characters) to mark the word indicator with red (and may be bold) if the translation length is exceeded and refuse to save it until the length fits.

@nijel nijel added enhancement Adding or requesting a new feature. ux Issues related to user experience. labels Apr 3, 2020
@nijel
Copy link
Member

nijel commented Apr 3, 2020

Having something more fancy requires using some better editor, there are already several issues related to this, see #2964 (comment)

@comradekingu
Copy link
Contributor

I think there should be hard and soft limits.
When the source is 168 of 150 chars, it makes no sense to hard-limit the translation to 150.
Was possible to copy source to get 168 to play with, but all in all frustrating to work with.

@Fat-Zer
Copy link
Collaborator Author

Fat-Zer commented Apr 3, 2020

@comradekingu, it's common to be external limit, which shouldn't be exceeded no matter what the length of source line is e.g. Google Play limits "Recent Changes" to 500 characters. For normal strings the «hard» limit is 10 times the size of source.

The soft AFAIK already exist by some checks e.g. MaxSizeCheck that limits size of strings by rendering them.

@comradekingu
Copy link
Contributor

I often see it being more than 500. Does that mean it is cut off at 500?

@Fat-Zer
Copy link
Collaborator Author

Fat-Zer commented Apr 4, 2020

AFAIK, yep... Google Play and F-droid just chop off the rest of the string. But I haven't found any related docs, so I'm not really sure... If it's crucial, I would rather double check...

@nijel
Copy link
Member

nijel commented Apr 4, 2020

See #1525 for discussion on Google Play limits.

@nijel nijel added this to To do in Translation editor via automation Apr 12, 2020
@nijel nijel added this to the 4.4 milestone Sep 15, 2020
nijel added a commit that referenced this issue Nov 13, 2020
- Highlight the focused input in a same way as with textarea
- Honor maxlength attribute and highlight the too long text

Fixes #4824
Issue #3662
@nijel nijel self-assigned this Nov 16, 2020
nijel added a commit that referenced this issue Nov 16, 2020
- Prepare for using as a translation editor
- Add warning when getting close to the chars limit
- Add support for counting label

Issue #3662
@nijel nijel moved this from To do to In progress in Translation editor Nov 16, 2020
Translation editor automation moved this from In progress to Done Nov 19, 2020
nijel added a commit that referenced this issue Nov 19, 2020
* Replace textarea by CodeMirror
* Make the length restriction softer (fixes #3662)
* Improved handling of fuzzy toggler (fixes #3910)
* Remove autosizer dependency as this is now done by CodeMirror
@github-actions
Copy link

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

nijel added a commit to nijel/weblate that referenced this issue Jan 7, 2021
It displays the counter and colors the border, but does not block editing.

This makes it possible to edit too long text before sending.

Fixes WeblateOrg#3662
kodiakhq bot pushed a commit that referenced this issue Jan 7, 2021
It displays the counter and colors the border, but does not block editing.

This makes it possible to edit too long text before sending.

Fixes #3662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. ux Issues related to user experience.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants