Skip to content

localization.js is getting replaced improperly by createtheme.sh, T-25558 #218

@raikasdev

Description

@raikasdev

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];
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions