mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-22 10:15:13 -05:00
Localize hard-coded texts (#2044)
* feat(lang): localize some views * feat(lang): an attempt at localizing vuetify (WIP) * feat(lang): localized some more screens * feat(lang): localized some more screens again * feat(lang): hack to localize vuetify * feat(lang): localize data management pages * fix linting errors --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
@@ -23,19 +23,22 @@ export function usePasswordField() {
|
||||
}
|
||||
|
||||
export const usePasswordStrength = (password: Ref<string>) => {
|
||||
const { i18n } = useContext();
|
||||
|
||||
const score = computed(() => {
|
||||
return scorePassword(password.value);
|
||||
});
|
||||
|
||||
|
||||
const strength = computed(() => {
|
||||
if (score.value < 50) {
|
||||
return "Weak";
|
||||
return i18n.tc("user.password-strength-values.weak");
|
||||
} else if (score.value < 80) {
|
||||
return "Good";
|
||||
return i18n.tc("user.password-strength-values.good");
|
||||
} else if (score.value < 100) {
|
||||
return "Strong";
|
||||
return i18n.tc("user.password-strength-values.strong");
|
||||
} else {
|
||||
return "Very Strong";
|
||||
return i18n.tc("user.password-strength-values.very-strong");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user