Repository: spyder-ide/spyder

Issue:
Message without translation in the tour
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

### Issue Report Checklist

* [ x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [ ] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [ ] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [ ] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [ ] Tried basic troubleshooting (if a bug/error)
    * [ ] Restarted Spyder
    * [ ] Reset preferences with ``spyder --reset``
    * [ ] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [ ] Tried the other applicable steps from the Troubleshooting Guide
* [ ] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description

In the tour in Spanish there is a message that is not translated:

Is defined in spyder/plugins/tours.py

    BUTTON_TEXT = ("Please click on the button below to run some simple "
                   "code in this console. This will be useful to show "
                   "you other important features.")

My proposed translation would be

"Por favor haz click en el botón más abajo para ejecutar algún código sencillo en
esta consola. Esto será útil para mostarte otras características importantes."

I know this should be added to spyder/locale/es/LC_MESSAGES/spyder.po, but
I didn't manage to make it work. So I submit this issue so that someone else can
help.

It is important to fix this, since this message can be annoying for new users that
do not speak English, and gives the impression of an unpolished product.

It would be useful if you add some instructions on translations to
CONTRIBUTING.md

### What steps reproduce the problem?

I'm using  Debian GNU/Linux with the following locale

LANG=es_AR.UTF-8
LANGUAGE=
LC_CTYPE="es_AR.UTF-8"
LC_NUMERIC="es_AR.UTF-8"
LC_TIME="es_AR.UTF-8"
LC_COLLATE="es_AR.UTF-8"
LC_MONETARY="es_AR.UTF-8"
LC_MESSAGES="es_AR.UTF-8"
LC_PAPER="es_AR.UTF-8"
LC_NAME="es_AR.UTF-8"
LC_ADDRESS="es_AR.UTF-8"
LC_TELEPHONE="es_AR.UTF-8"
LC_MEASUREMENT="es_AR.UTF-8"
LC_IDENTIFICATION="es_AR.UTF-8"
LC_ALL=

Set this locale and open the tour in spyder.



Discussion:
Hey @pdenapo, thanks for reporting. You're right about this: we missed to add the string corresponding to the `BUTTON_TEXT` variable for translation, and that's why it's not translated in Spanish nor in any of other languages we support.

We'll fix this omission in Spyder 6 and we'll be sure to add your translation too.

Resolving patch:
diff --git a/spyder/plugins/tours/tours.py b/spyder/plugins/tours/tours.py
--- a/spyder/plugins/tours/tours.py
+++ b/spyder/plugins/tours/tours.py
@@ -19,9 +19,10 @@
 QTCONSOLE_LINK = "https://qtconsole.readthedocs.io/en/stable/index.html"
 BUTTON_TEXT = ""
 if sys.platform != "darwin":
-    BUTTON_TEXT = ("Please click on the button below to run some simple "
-                   "code in this console. This will be useful to show "
-                   "you other important features.")
+    BUTTON_TEXT = _(
+        "Please click on the button below to run some simple code in this "
+        "console. This will be useful to show you other important features."
+    )
 
 # This test should serve as example of keys to use in the tour frame dicts
 TEST_TOUR = [


Test patch: