Skip to content

Commit

Permalink
BUGFIX: Readd configuration urls and remove remove l18n hack
Browse files Browse the repository at this point in the history
  • Loading branch information
markusguenther committed Sep 4, 2019
1 parent 87d39cb commit b9e5aea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Expand Up @@ -25,7 +25,10 @@
<script type="text/javascript">
// TODO: Get rid of those global variables
{neos:backend.javascriptConfiguration()}
</script>
</script>

<link rel="neos-vieschema" href="{f:uri.action(action: 'vieSchema', controller: 'Backend\Schema', package: 'Neos.Neos', absolute: true, arguments: {version: '{neos:backend.configurationCacheVersion()}'})}" />
<link rel="neos-xliff" href="{f:uri.action(action: 'xliffAsJson', arguments: {locale: '{neos:backend.interfaceLanguage()}', version: '{neos:backend.xliffCacheVersion()}'}, controller: 'Backend\Backend', package: 'Neos.Neos', absolute: true) -> f:format.raw()}" />
</f:section>

<f:section name="body">
Expand Down

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Neos.Neos/Resources/Public/JavaScript/Shared/I18n.js
Expand Up @@ -81,6 +81,12 @@ define(
* @returns {string}
*/
translate: function(id, fallback, packageKey, source, parameters, context) {
// Prevent caching missing keys when used too early
if (this.get('initialized') === false) {
console.error('Labels not initialized when trying to translate "' + id + '"');
return;
}

var translatedValue, translationParts;
fallback = fallback || id;
packageKey = packageKey || this.defaultPackage;
Expand Down

0 comments on commit b9e5aea

Please sign in to comment.