-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
Can you please add coloring if we made any changes in current text #9541
Comments
This issue has been put aside. It is currently unclear if it will ever be implemented as it seems to cover too narrow of a use case or doesn't seem to fit into Weblate. Please try to clarify the use case or consider proposing something more generic to make it useful to more users. |
This one is for the bot: Mainly for proofreading purposes, add some color indicator to the edit box to minimize:
|
Hi again, I have experimented with border coloring. I used the following code in "weblate/templates/translate.html" after line 170 (where the edit box is added), and it adds color to the input box border if the text has changed. <style>
.border {
border: 1px solid #dee2e6 !important;
}
.border-warning {
--bs-border-opacity: 1;
border-color: rgba( 220, 53, 69, 1) !important;
}
</style>
<script>
window.addEventListener("DOMContentLoaded", (event) => {
let editor = $(".translation-editor")
let original = editor.text()
let changed
let detect = function(){
changed = original !== this.value
if (changed){
editor.addClass("border border-warning")
}else{
editor.removeClass("border border-warning")
}
}
editor.keyup(detect)
});
</script> The code is long because:
Can someone solve these two issues and make the code more elegant? |
I made a brand new monkey script for this purpose, and put it as a gist here: https://gist.github.com/yilmazdurmaz/db1e4ce6f60fdd000c7720fdd4e1a05c Install TamperMonkey/GreaseMonkey on Edge/Chrome/Firefox and import the script.
I hope you will find a better solution than a third-party one like this. |
Describe the problem
Proofreading is a bit tricky process when translating, especially in electronic form.
When using pen and paper, you can make any marks on the part that needs editing.
For electronic active editing, such as Weblate, this is not possible in the expected sense.
And the worst part is to click on the wrong button to go to the next string, without saving if we had any changes.
Describe the solution you'd like
You can help us in two ways, one is simple to implement, the other needs some expertise
Describe alternatives you've considered
Other than trying to memorize, I haven't tried anything else.
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: