Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 18
IDProjectCategoryView StatusLast Update
17163Feature requestsTranslationpublic2023-11-27 15:46
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityfeature 
Status closedResolutionfixed 
Summary17163: Allow translation by DB
Description

Currently : there are solution to update some string via TWIG but there are no easy solution to replace some string except cvia edition po file.

I think it can be great to have a way to have it via DB

Additional Information

My idea

Create our own LsCDbMessageSource : (unsure needed)

Add it to internal

        'messagesgettext' => array(
            'class' => 'CGettextMessageSource',
            'cachingDuration'=>3600,
            'forceTranslation' => true,
            'useMoFile' => true,
            'basePath' => __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'locale'
        ),
        'messages' => array(
            'class' => 'LsCDbMessageSource',
            'cachingDuration'=>3600,
            'forceTranslation' => true,
        ),

https://www.yiiframework.com/doc/api/1.1/CMessageSource#translateMessage-detail

register to onMissingTranslation event to return Yii::t('', $sToTranslate, array(), 'messagesgettext', $sLanguage)

Or use category ?

TagsNo tags attached.
Bug heat18
Story point estimate
Users affected %

Relationships

related to 09649 new Feature requests Plugin event : update "default core string" 
has duplicate 14782 closedDenisChenu Feature requests Possibility to override single translations 
related to 19283 new Bug reports Manual page about adding custom translations is missing 

Activities

c_schmitz

c_schmitz

2021-03-07 21:37

administrator   ~62831

That would be nice.

DenisChenu

DenisChenu

2022-01-19 18:22

developer   ~68051

Last edited: 2022-02-10 09:50

https://projects.limesurvey.org/portal/limesurvey#taskdetail/85781000001335039/85781000001337011/85781000001460001

Mazi

Mazi

2022-02-09 16:01

updater   ~68256

Last edited: 2022-02-10 09:50

@DeniChenu, can you provide some background information on how one would use this tool?

For our projects we are somtimes asked if for a certain survey we can have different texts e.g. for the text at the token entry screen or similar. Will this be doable with your feature?

Mazi

Mazi

2022-02-09 16:01

updater   ~68257

Last edited: 2022-02-10 09:50

^- @DenisChenu...

DenisChenu

DenisChenu

2022-02-09 16:03

developer   ~68258

Last edited: 2022-02-10 09:50

There is no GUI to do it.
I don't think we need a complete clean manual to do it (avoid translation not on https://translate.limesurvey.org/)

Else all is here : https://github.com/LimeSurvey/LimeSurvey/commit/1ed30057abb61c5a77477336b72c8a7dcdeb4618#

Mazi

Mazi

2022-02-09 21:02

updater   ~68259

Last edited: 2022-02-10 09:50

@DenisChenu, I still do not really know what this can be used for...

@c_schmitz, any clue...?

DenisChenu

DenisChenu

2022-02-10 08:12

developer   ~68260

Last edited: 2022-02-10 09:50

I still do not really know what this can be used for...

You want to show "Submit my data" in all survey in de.

You create a {{source_message}} line with message = "Submit", you get the id.
You create a {{message}} with the id, language = 'de' and translation = "Submit my data"

Mazi

Mazi

2022-02-10 09:23

updater   ~68261

Last edited: 2022-02-10 09:50

I probably need to see that at a real example...

DenisChenu

DenisChenu

2022-02-10 09:49

developer   ~68262

Last edited: 2022-02-10 09:50

I don't understand … real example .

See the current translation here : https://translate.limesurvey.org/projects/limesurvey-4/de/default/

You can have your own translation with DB update on any of this string…

Issue History

Date Modified Username Field Change
2021-03-04 17:16 DenisChenu New Issue
2021-03-04 17:16 DenisChenu Relationship added related to 09649
2021-03-07 21:37 c_schmitz Note Added: 62831
2021-11-25 09:57 galads Assigned To => galads
2021-11-25 09:57 galads Status new => assigned
2022-01-19 18:22 DenisChenu Note Added: 68051
2022-01-19 18:22 DenisChenu Bug heat 2 => 4
2022-01-19 18:23 DenisChenu Relationship added has duplicate 14782
2022-01-19 18:23 DenisChenu Bug heat 4 => 16
2022-02-09 16:01 Mazi Note Added: 68256
2022-02-09 16:01 Mazi Bug heat 16 => 18
2022-02-09 16:01 Mazi Note Added: 68257
2022-02-09 16:03 DenisChenu Note Added: 68258
2022-02-09 21:02 Mazi Note Added: 68259
2022-02-10 08:12 DenisChenu Note Added: 68260
2022-02-10 09:23 Mazi Note Added: 68261
2022-02-10 09:49 DenisChenu Note Added: 68262
2022-02-10 09:50 DenisChenu Assigned To galads => DenisChenu
2022-02-10 09:50 DenisChenu Status assigned => resolved
2022-02-10 09:50 DenisChenu Resolution open => fixed
2022-05-03 18:07 c_schmitz Status resolved => closed
2023-11-27 15:46 DenisChenu Relationship added related to 19283