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

misc(i18n): add assertion script #5686

Merged
merged 2 commits into from
Jul 19, 2018
Merged

misc(i18n): add assertion script #5686

merged 2 commits into from
Jul 19, 2018

Conversation

patrickhulce
Copy link
Collaborator

adds an assertion script to make sure we keep the strings up to date

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

other than the thing, this is good

colorText "✅ PASS. All strings have been collected." "$green"
else
colorText "❌ FAIL. Strings have changed." "$red"
echo "Commit the changes to `lighthouse-core/lib/locales/` update the strings."
Copy link
Member

Choose a reason for hiding this comment

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

in bash, backticks evaluate. ;)

so this actually triggers this error: assert-strings-collected.sh: line 48: lighthouse-core/lib/locales/: Is a directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

haha, whoops! that'll show me to make aesthetic changes after running :)

function teardown { rm -f "$currentstringsPath" "$freshstringsPath"; }
trap teardown EXIT

cp $collectedstringsPath $currentstringsPath
Copy link
Member

@paulirish paulirish Jul 19, 2018

Choose a reason for hiding this comment

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

actually wanna throw quotes around these paths? shellcheck prefers it like that in case there are spaces in my project path. (hint: there aren't)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ya, done

@patrickhulce patrickhulce merged commit 6e7db32 into master Jul 19, 2018
@patrickhulce patrickhulce deleted the i18n_assert branch July 19, 2018 17:15
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.

None yet

2 participants