View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
17825Bug reportsTranslationpublic2022-09-19 14:47
Reportersamarta Assigned Togabrieljenik  
PrioritynoneSeveritytext 
Status confirmedResolutionopen 
Product Version5.2.x 
Summary17825: Strings “LimeSurvey internal database” not available for translation in GlotPress
Description

Hi,
The string “LimeSurvey internal database” , in the initial window , in the drop down “Authentication method” does not appears to be translated in GlotPress.
It does not appear translated in Portuguese-PT.
I also checked with Polish and German. All 3 of these languages are already 100% translated.

Attached are two images of the situation in German and Portuguese-PT.

Steps To Reproduce

Check the drop down “Authentication method” in the initial window
Expected result

(Base de dados interna do LimeSurvey)

Actual result

(LimeSurvey internal database)

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)Version 5.2.8+220103
I will donate to the project if issue is resolvedNo
BrowserSafari
Database type & versionmysql 7.4.21
Server OS (if known)centos
Webserver software & version (if known)
PHP Version7.4.21

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

samarta

samarta

2022-01-07 11:23

reporter  

ls_internaldatabase_PT.png (38,146 bytes)   
ls_internaldatabase_PT.png (38,146 bytes)   
ls_internaldatabase_DE.png (34,895 bytes)   
ls_internaldatabase_DE.png (34,895 bytes)   
samarta

samarta

2022-03-09 10:59

reporter   ~68606

Hi,

The issue remains in version 5.3.4+220309

gabrieljenik

gabrieljenik

2022-09-16 16:12

manager   ~71793

@ollehar what do you think about the following.

How about adding a parameter to the newLoginForm event? The new parameter would indicate the name of the authentication method. If it is left empty, it is taken from the same place as now.

ollehar

ollehar

2022-09-16 16:14

administrator   ~71794

Hm, how would that solve the translation issue?

gabrieljenik

gabrieljenik

2022-09-16 16:30

manager   ~71797

Each auth plugin can set their own translation of their plugin name

ollehar

ollehar

2022-09-16 16:33

administrator   ~71798

Yes, but it can only be translated if the text is wrapped in gT(), which I believe is the problem here?

gabrieljenik

gabrieljenik

2022-09-16 16:35

manager   ~71799

Each plugin would send the text already translated... not sure if talking about the same.

ollehar

ollehar

2022-09-16 16:39

administrator   ~71800

Last edited: 2022-09-16 16:39

protected static $name = 'LimeSurvey internal database';  // Missing gT or eT

Hm. Maybe we also need getName() in PluginBase, so that gT is applied.

gabrieljenik

gabrieljenik

2022-09-16 22:33

manager   ~71807

This is how the dropdown is formed. (see attachment)

If we use a method, it will have to be a static method.
Probably i would separate it from the name, as to allow a friendly label to be shown and not the technical name.
So I wouldn't choose the method name to be "getPluginName()", but "getAuthenticationName()", and that could be on the AuthPluginBase.

I prefer the new parameter on the event as it is a bit cleaner as all the exchange in between the plugin and the core would be via event.

What do you think?

As for setting the new parameter, we will not be able to use event->set() as that is not multidimensional and we need to allow all plugins to set a different value each. So I would create a new event method event->setForPlugin($plugin, $key, $value).

That would be very usefull for avoiding workarounds like this (https://github.com/LimeSurvey/LimeSurvey/blob/master/application/core/plugins/ExportR/ExportR.php#L57) where one plugin can easily mess something set by another plugin. (not talking about security, but about overwriting by accident, for example)

Thoughts?

image.png (98,133 bytes)   
image.png (98,133 bytes)   
DenisChenu

DenisChenu

2022-09-19 09:19

developer   ~71810

Last edited: 2022-09-19 09:22

Hm. Maybe we also need getName() in PluginBase, so that gT is applied.

I already done like this before :)
(i stop : i keep the name unchanged now)

Alternative solution : Plugin event can get name for drop-down with another function ?

Then : name of plugin can stay AuthCas for but shown as «Authentification with your CAS account» in this dropdow.

Easy solution

    public function getPublicName()
    {
        return $this->getName();
    }
ollehar

ollehar

2022-09-19 11:22

administrator   ~71819

Last edited: 2022-09-19 11:26

Hmmm, if there's a config.xml, it will read name from there instead. ExtensionConfig::getName(). Would it make sense to put gT() in there? But it should be $plugin->gT() so it would read from plugin translation files first. :d

But yeah, maybe you're right, it should be a separate label, and plugin name should never really be translated anyway...?

DenisChenu

DenisChenu

2022-09-19 11:26

developer   ~71820

You can already translate name in own plugin :
https://github.com/LimeSurvey/LimeSurvey/blob/e871bea897585edf28de26d0723bf02d746210f7/application/libraries/PluginManager/PluginBase.php#L188

No need to add gT globally … just do it for needed part inside needed plugin.

The question about $this->gT is already open somewhere …
Improving translation in core plugin is not improving translation for all other plugin.

Same for SurveyTheme and QuestionTheme : and here : no way …

gabrieljenik

gabrieljenik

2022-09-19 14:17

manager   ~71825

I prefer the new parameter on the event as it is a bit cleaner as all the exchange in between the plugin and the core would be via event.

Thoughts on this?

DenisChenu

DenisChenu

2022-09-19 14:46

developer   ~71827

Last edited: 2022-09-19 14:47

all the exchange in between the plugin and the core would be via event.

No … since it extend a existing Class : for me it's clear it can replace public function of this class.

I really prefer to use getName(); than a new event …
( but prefer to have a dedicated function since i use Class name for name now).

Vote :
Event value : 1
Function call : 1

Issue History

Date Modified Username Field Change
2022-01-07 11:23 samarta New Issue
2022-01-07 11:23 samarta File Added: ls_internaldatabase_PT.png
2022-01-07 11:23 samarta File Added: ls_internaldatabase_DE.png
2022-03-09 10:59 samarta Note Added: 68606
2022-03-09 10:59 samarta Bug heat 0 => 2
2022-08-04 21:10 gabrieljenik Assigned To => gabrieljenik
2022-08-04 21:10 gabrieljenik Status new => confirmed
2022-09-16 16:12 gabrieljenik Note Added: 71793
2022-09-16 16:12 gabrieljenik Bug heat 2 => 4
2022-09-16 16:14 ollehar Note Added: 71794
2022-09-16 16:14 ollehar Bug heat 4 => 6
2022-09-16 16:30 gabrieljenik Note Added: 71797
2022-09-16 16:33 ollehar Note Added: 71798
2022-09-16 16:35 gabrieljenik Note Added: 71799
2022-09-16 16:39 ollehar Note Added: 71800
2022-09-16 16:39 ollehar Note Edited: 71800
2022-09-16 22:33 gabrieljenik Note Added: 71807
2022-09-16 22:33 gabrieljenik File Added: image.png
2022-09-19 09:19 DenisChenu Note Added: 71810
2022-09-19 09:19 DenisChenu Bug heat 6 => 8
2022-09-19 09:22 DenisChenu Note Edited: 71810
2022-09-19 09:22 DenisChenu Note Edited: 71810
2022-09-19 11:22 ollehar Note Added: 71819
2022-09-19 11:26 ollehar Note Edited: 71819
2022-09-19 11:26 DenisChenu Note Added: 71820
2022-09-19 14:17 gabrieljenik Note Added: 71825
2022-09-19 14:46 DenisChenu Note Added: 71827
2022-09-19 14:47 DenisChenu Note Edited: 71827