Project

General

Profile

Actions

Bug #79879

closed

Missing translations for modal cancel / close buttons

Added by Alexander Stehlik about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2017-02-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

The cancel / close buttons of modals are not translated. Noticed in these use cases:

  • Moving a file in the file list
  • Reload required dialog of the form engine (e.g. when changing the page type)

Those problems seem to come from the typo3/sysext/backend/Resources/Public/JavaScript/Modal.js code.

Modal.confirm tries to use translations as defaults which do not exist:

text: $(this).data('button-close-text') || TYPO3.lang['button.cancel'] || 'Cancel',

The initialization for the .t3js-modal-trigger markup does not even try to use translations. It uses a hardcoded "close" string.

My suggestion so solve this issue would be:

  1. Add 'button.ok' and 'button.cancel to the TYPO3.lang array by default
  2. Use those translations in both modals as default fallback

I can provide a patch if you can point me to the place where I can add translations to TYPO3.lang by default. I do not want to put it in the PageRenderer.


Files

Delete file.png (74.9 KB) Delete file.png Florian Rival, 2018-09-03 16:03
Actions

Also available in: Atom PDF