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

FIX Look in new files for duplicated strings #34

Conversation

GuySartorelli
Copy link
Member

We were only looking for duplicated english strings in files that already existed - but when new files are pulled down from transifex they weren't being checked.

Issue

@GuySartorelli GuySartorelli force-pushed the pulls/1.2/check-new-files-for-en branch from edfca57 to cf7740a Compare August 5, 2024 21:48
Comment on lines +461 to +465
$ext = pathinfo($path, PATHINFO_EXTENSION);
$enPath = preg_replace('#/[^/\.]+\.js[a-zA-Z]*$#', '/en.' . $ext, $path);
if (!file_exists($enPath)) {
$enPath = preg_replace('#/[^/\.]+\.js[a-zA-Z]*$#', '/en.json', $path);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also new - userforms has their src files as *.js files, not *.json files. So check for the en file with the same ext first, then try json explicitly as a fallback,

@emteknetnz emteknetnz merged commit 36b2cee into silverstripe:1.2 Aug 6, 2024
8 checks passed
@emteknetnz emteknetnz deleted the pulls/1.2/check-new-files-for-en branch August 6, 2024 00:47
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

Successfully merging this pull request may close these issues.

2 participants