Skip to content

Commit

Permalink
fixed JavaScript translations generation (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
s3tezsky authored Jul 1, 2020
2 parents c4ec5e5 + 72980f4 commit 1c103b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions assets/js/frontend/utils/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ const defaults = {
buttonClose: true,
buttonCancel: false,
buttonContinue: false,
textContinue: Translator.trans('Yes'),
textCancel: Translator.trans('No'),
textHeading: '',
urlContinue: '#',
cssClass: 'window-popup--standard',
Expand Down Expand Up @@ -40,7 +38,11 @@ export default class Window {
constructor (inputOptions) {
this.$activeWindow = null;

this.options = $.extend(defaults, inputOptions);
this.options = $.extend(
{ textContinue: Translator.trans('Yes'), textCancel: Translator.trans('No') },
defaults,
inputOptions
);

if (this.$activeWindow !== null) {
this.$activeWindow.trigger('windowFastClose');
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<property name="path.root" value="${project.basedir}"/>
<property name="path.vendor" value="${path.root}/vendor"/>
<property name="path.framework" value="${path.vendor}/shopsys/framework"/>
<property name="path.framework.assets" value="node_modules/@shopsys/framework"/>
<property name="path.framework.assets" value="${path.root}/node_modules/@shopsys/framework"/>
<property name="path.frontend-api" value="${path.vendor}/shopsys/frontend-api"/>

<property name="phpstan.level" value="4"/>
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Encore
sources.getFrameworkVendorDir() + '/src/Resources/translations/*.po',
'./translations/*.po',
];
const outputDirForExportedTranslations = Encore.isProduction() ? './web/build/' : './assets/js/';
const outputDirForExportedTranslations = './assets/js/';

try {
processTrans(dirWithJsFiles, dirWithTranslations, outputDirForExportedTranslations);
Expand Down

0 comments on commit 1c103b8

Please sign in to comment.