nginxconfig.io
nginxconfig.io copied to clipboard
"Copy a base64 string of the compressed config" translation bug
Information
Details
Description
The translation for "Copy a base64 string of the compressed config" will revert to English after clicked. Also, the "Copied" text isn't translatable.
Steps to reproduce
Scroll down to Download section and "click on the Copy a base64 string of the compressed config" link.
Expected behavior
Keep the translation after clicking.
Screenshots
Ah! Good catch. I think this logic is responsible for this:
https://github.com/digitalocean/nginxconfig.io/blob/479162576d291d2c930ba37cf322af56ff5dd307/src/nginxconfig/templates/setup.vue#L152-L175
Instead of setting originalText
when this method is first called, we probably want to look at trying to store the original text right before the text change occurs (either in the existing success hook where it's changed to "copied", or in an earlier hook if ClipboardJS provides it).
And then the "copied" text just needs to use the translation API (this.$t
) instead of being a plain string.
Replacing the text makes the whole sentence looks weird.
or, Copied, paste it in your server's command line and execute it.
Maybe It's better to show a tooltip instead. Like this.
@MattIPv4 I'd like to work on this issue. Please, can you assign it to me?
Sure thing :)