Skip to content

Commit

Permalink
update tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
GoWale authored Feb 11, 2024
1 parent 96b7d58 commit 72ed7ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ export class cds_launchpad_plugin{
}

// define locale to use
const locale = null;
let locale = null;

// check for existing files
if(!locale && options.locale && fs.existsSync(i18nPath.replace(/(\.properties)$/, `_${options.locale}$1`))) local = i18nPath.replace(/(\.properties)$/, `_${options.locale}$1`)
if(!locale && options.locale && fs.existsSync(i18nPath.replace(/(\.properties)$/, `_${options.locale}$1`))) locale = i18nPath.replace(/(\.properties)$/, `_${options.locale}$1`)
// https://cap.cloud.sap/docs/node.js/events#locale => req.locale or old (cds.user.locale)
if(!locale && req_locale.default(request) && fs.existsSync(i18nPath.replace(/(\.properties)$/, `_${cds.user?.local}$1`))) locale = i18nPath.replace(/(\.properties)$/, `_${req_locale.default(request)}$1`)
if(!locale && cds.env.i18n.default_language && fs.existsSync(i18nPath.replace(/(\.properties)$/, `_${cds.user?.local}$1`))) locale = i18nPath.replace(/(\.properties)$/, `_${cds.env.i18n.default_language}$1`)
Expand Down

0 comments on commit 72ed7ff

Please sign in to comment.