Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localization.js is getting replaced improperly by createtheme.sh #218

Open
raikasdev opened this issue Apr 1, 2024 · 0 comments
Open

localization.js is getting replaced improperly by createtheme.sh #218

raikasdev opened this issue Apr 1, 2024 · 0 comments

Comments

@raikasdev
Copy link
Member

raikasdev commented Apr 1, 2024

Seems like the newtheme script only replaces one occurence per line resulting in the script being broken.

Project name "test_project" results in code like this (the second clause after || is broken):

export default function getLocalization(stringKey) {
  if (typeof window.test_project_screenReaderText === 'undefined' || typeof window.air_light_screenReaderText[stringKey] === 'undefined') {
    // eslint-disable-next-line no-console
    console.error(`Missing translation for ${stringKey}`);
    return '';
  }
  return window.test_project_screenReaderText[stringKey];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant