View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 20294 | Bug reports | Translation | public | 2025-10-10 16:40 | 2025-11-12 16:31 |
| Reporter | Freda | Assigned To | c_schmitz | ||
| Priority | none | Severity | minor | ||
| Status | resolved | Resolution | fixed | ||
| Summary | 20294: Translation fails (Dari and Tigrinya) due to missing language code mappings | ||||
| Description | No explicit error appears even when debug mode is enabled. The browser console shows a true response, but no translation result is produced. see screenshot. After investigation (credit to Tim), it appears that the issue is caused by missing language code mappings in: /assets/scripts/admin/translation.js and possibly also in QuickTranslationController::translateGoogleApi Adding a manual mapping for the language resolves the issue (tested in browser by manipulating translation.js). | ||||
| Steps To Reproduce | Steps to reproduceCreate or open any survey with multiple languages. Add Dari (prs) or Tigrinya (ti) as an additional language. Open the “Quick Translation” tool. Attempt to auto-translate from English to the additional language. Expected resultThe translation should complete successfully, similar to other supported languages. Actual resultTranslation fails see attached screenshot. Proposed Fix: | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 10 | ||||
| Complete LimeSurvey version number (& build) | . | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | chrome | ||||
| Database type & version | .. | ||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | . | ||||
|
@gabrieljenik, @tibor.pacalat, we also tested some languages with Google translate recently, see 20323. There may be some more languages missing:
For the previously mentioned language "Dari" the issue could also be related to different language codes used (see my bug report link above). Google treats this as a variation of Persian and thus uses code "fa" while Limesurvey uses "prs" as language code. |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=39147 |
|
|
LimeSurvey: master fe4ebd25 2025-11-12 16:31 Committer: GitHub Details Diff |
Fixed issue 20294: Quick-translate using Google translation API would not work with some languages (04523) |
Affected Issues 20294 |
|
| mod - application/controllers/QuickTranslationController.php | Diff File | ||
| mod - application/views/quickTranslation/translateformheader_view.php | Diff File | ||
| mod - assets/scripts/admin/translation.js | Diff File | ||
| mod - composer.json | Diff File | ||
| mod - vendor/composer/autoload_psr4.php | Diff File | ||
| mod - vendor/composer/autoload_static.php | Diff File | ||
| mod - vendor/composer/installed.php | Diff File | ||
| rm - vendor/gtranslate-api/COPYING | Diff | ||
| rm - vendor/gtranslate-api/ChangeLog | Diff | ||
| rm - vendor/gtranslate-api/GTranslate.php | Diff | ||
| rm - vendor/gtranslate-api/languages.ini | Diff | ||
| rm - vendor/gtranslate-api/languages.v2.ini | Diff | ||
| add - vendor/viniciusgava/google-translate-api/.gitignore | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/.travis.yml | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/LICENSE | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/composer.json | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/phpcs.xml | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/phpunit.xml | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Client.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/DetectInterface.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/DetectErrorException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/InvalidAccessKeyException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/InvalidLanguageException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/InvalidSourceLanguageException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/InvalidTargetLanguageException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/InvalidTextException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/LanguagesErrorException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/Exception/TranslateErrorException.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/LanguagesInterface.php | Diff File | ||
| add - vendor/viniciusgava/google-translate-api/src/TranslateInterface.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-10-10 16:40 | Freda | New Issue | |
| 2025-10-10 16:40 | Freda | File Added: Screenshot 2025-09-29 at 14.41.26.png | |
| 2025-10-13 09:58 | tibor.pacalat | Assigned To | => gabrieljenik |
| 2025-10-13 09:58 | tibor.pacalat | Status | new => assigned |
| 2025-10-25 15:31 | Mazi | Note Added: 83671 | |
| 2025-10-25 15:31 | Mazi | Bug heat | 0 => 2 |
| 2025-10-25 15:32 | Mazi | Relationship added | related to 20323 |
| 2025-11-12 01:05 | c_schmitz | Assigned To | gabrieljenik => c_schmitz |
| 2025-11-12 15:36 | c_schmitz | Relationship replaced | has duplicate 20323 |
| 2025-11-12 15:36 | c_schmitz | Bug heat | 2 => 8 |
| 2025-11-12 15:36 | Mazi | Bug heat | 8 => 10 |
| 2025-11-12 16:01 | c_schmitz | Status | assigned => ready for code review |
| 2025-11-12 16:01 | c_schmitz | Note Added: 83754 | |
| 2025-11-12 16:31 | c_schmitz | Changeset attached | => LimeSurvey master fe4ebd25 |
| 2025-11-12 16:31 | c_schmitz | Note Added: 83756 | |
| 2025-11-12 16:31 | c_schmitz | Status | ready for code review => resolved |
| 2025-11-12 16:31 | c_schmitz | Resolution | open => fixed |