Closed Valdnet closed 3 years ago
The The translation input is above 5000
information should only be displayed once when you exceed the 5000-character limit while typing or pasting text. It should not show up when deleting text.
This is a bit annoying for the user as the message is displayed multiple times.
Fixed that.
A test version, please 😉.
There is a bug. A message appears after the text has been copied and the letter deleted. It shouldn't be there.
Procedure:
Only the message appears when:
1. Typing a character >5000, that is, at 5001. Next does not appear anymore.
Example: 5000 + 1 = 5001 (message appears) + 1 (message no longer appears)
2. Text is pasted that exceeds 5000 characters.
Example: 2500 + 2501 = 5001 (message appears) + 200 (message no longer appears)
So you want the message to just appear once and never again?
Yes. This is an additional option anyway. The character counter (it is red) informs about exceeding the character limit. A single message about exceeding the character limit is enough.
Should be corrected: No message appears when you enter text for the first time after deleting 1 character and re-entering the character. It appears only after deleting 2 characters and re-entering the character.
This only happens the first time you enter the text and after translating and deleting the text.
Current behavior example: 5010 (message appears) - 1 + 1 (there is no message, but it should appear) + 1 + 1 5010 (message appears) - 2 + 1 (message appears) + 1 + 1 5010 (message appears) - 1 + 1 (message appears) + 1 + 1
An example of correct operation: 5010 (message appears) - 1 + 1 (message appears) + 1 + 1 5010 (message appears) - 2 + 1 (message appears) + 1 + 1
Works correctly 👍. If I find a problem I will reopen the issue 😉.
Translations....
Ah yes.
@Aga-C Will you deal with translations?
@Aga-C Will you deal with translations?
Sorry, I don't have time to work on this project. If it's a translation in a lang file, you can do this @Valdnet. If there's a hard-coded string in a code, then @ManeraKai should use a translatable one.
No worries. I'll extract the strings for you @Valdnet.
@Aga-C Thanks for the information 😉.
I'll extract the strings
@ManeraKai Thanks 👍. I'm waiting 😁.
After tapping the character counter icon, the background is too large for the icon size. Bottom padding should be removed.
I did that intentionally to make it as every other button:
Which one?
The character counter icon is now in the right place after adding information. It works as a button, only when you tap on the icon, the background of the icon is too large compared to the icon. I know you have a color problem on your monitor and you may not be able to see it. See it again:
😁
I changed the background color for the tap so you can see the size.
It should be this size:
Fixed it, but I'll push the commit with the translation. Btw, I'm trying to add variables to translation strings, but didn't find a documentation for that. Trying to find it.
Didn't find a proper native solution. Implemented it manually.
I'll add the Arabic translation with your @Valdnet merge request. Don't merge it too quickly.
In these strings, the variables should be pulled out of the translation. This will make the translation easier for future translators and make it possible not to make mistakes.
Example:
"input_calc": "Exceeded 5000 character limit by %1",
"input_fraction": "Entered %1 characters out of 5000 possible",
You've added a variable too %1
?
Do you want to simplify variable names or add a percent sign instead of $
to declare a variable?
I want the variables to be replaced with a %
or $
sign in the translation. No matter how easier it is for you. In dependencies, as the code allows 😉.
"input_calc": "Exceeded 5000 character limit by $lengthDifference",
"input_fraction": "Entered $length characters out of 5000 possible",
?
I'm adding names to let the user know what that variable is talking about for translating purposes.
Changed them.
Add singular and plural to the text string:
Entered $inputLength characters out of 5000 possible
characters
must decay into singular and plural, e.g .:
one: Entered $inputLength character out of 5000 possible
few: Entered $inputLength characters out of 5000 possible
many: Entered $inputLength characters out of 5000 possible
other: Entered $inputLength characters out of 5000 possible
When you should say it's many? After 10?
When you should say it's many? After 10?
There is a lot already at 5, that is: 5 characters
.
For:
one: 1
few: 2-4
many: 5, 6, 7, 8, 9, 10, 11 …
Translation made in PR: #119.
For a light theme, the character count icon should now be green (theme color). It now looks like it is inactive.
?
Cool 👍. I close the issue.
@ManeraKai The toasts are disappearing too quickly, and it's hard to read the longer texts. I mean, all toasts in the app should behave consistently. I think, 2 seconds will be enough.
Proposal for the new version of the application to add information for the character counter. After clicking on the character counter, information about the number of characters would appear, for example: "Entered 15 characters out of 5000 possible". If it exceeds the value of 5000 characters when the counter is red, then after tapping it may change to e.g. "Exceeded limit 5 characters out of 5000 possible".
Information like this: "The translation input is above 5000".
Such additional information would immediately explain what this meter is about. Currently, the user can click on the character counter, but nothing happens. Only later realizes that this is just information, not a function button.