Skip to content

Commit

Permalink
Merge pull request #312 from covidcanidoit/activity-search-i18n
Browse files Browse the repository at this point in the history
Add i18n placeholders for ActivitySearchbar component [#140]
  • Loading branch information
awwaiid committed Jan 31, 2021
2 parents 4ff44a3 + 6675ccf commit a75b9d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/components/ActivitySearchbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@
<template v-if="searching">
<li>
<v-btn @click="onSearch">
Request a risk score
<br />
for {{ computedSearch(search) }}
{{ $t("request_risk_score", { search: computedSearch(search) }) }}
</v-btn>
</li>
</template>
</template>
</VueSelect>
<v-dialog v-model="suggestionTriggered" max-width="290">
<v-card class="modalCard">
<v-card-title class="headline">Activity Suggestion</v-card-title>
<v-card-text>Thanks for suggesting an activity</v-card-text>
<v-card-title class="headline">
{{ $t("activity_suggestion") }}
</v-card-title>
<v-card-text>{{ $t("thanks_for_suggestion") }}</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="green darken-1"
text
@click="suggestionTriggered = false"
>
Ok
{{ $t("ok") }}
</v-btn>
</v-card-actions>
</v-card>
Expand Down
6 changes: 5 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"home": "Home",
"about": "About",
"activities": "Activities",
"blog": "Blog"
"blog": "Blog",
"request_risk_score": "Request a risk score for {search}",
"thanks_for_suggestion": "Thanks for suggesting an activity",
"ok": "Ok",
"activity_suggestion": "Activity suggestion"
}
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import en from "./locales/en.json";
import es from "./locales/es.json";
const i18n = new VueI18n({
locale: "en",
fallbackLocale: "en",
messages: { en, es }
});

Expand Down

0 comments on commit a75b9d4

Please sign in to comment.