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

Detect missing schemes for url resources #20

Open
jzbrooks opened this issue Feb 1, 2023 · 2 comments
Open

Detect missing schemes for url resources #20

jzbrooks opened this issue Feb 1, 2023 · 2 comments

Comments

@jzbrooks
Copy link
Contributor

jzbrooks commented Feb 1, 2023

If a string resource has a single variant that begins with common url schemes (http:, https:, mailto:, tel:, sms:, etc), every version of the string resource should begin with that prefix.

This has caused an issue where a string was updated in crowdin without a scheme for a specific locale which caused action view intents to not resolve, so the app would crash.

@jzbrooks
Copy link
Contributor Author

jzbrooks commented Feb 1, 2023

@jzbrooks
Copy link
Contributor Author

jzbrooks commented Feb 4, 2023

https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/TranslationDetector.kt

This might be a good starting point for this check since the translation detector also has to inspect every resource variant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant