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

locale: fix locale keys #916

Merged
merged 6 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default class TheEditor extends Mixins(BaseMixin) {
this.loaderProgress.direction?.charAt(0).toUpperCase() + this.loaderProgress.direction?.slice(1)
}

return this.$t('Editor.' + directionUppercase)
return this.$t(`Editor.${directionUppercase}`)
}

get availableServices() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/mixins/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ export default class DashboardMixin extends BaseMixin {
subStrings.forEach((subStr) => {
panelName += capitalize(subStr)
})
return this.$t('Panels.' + panelName + 'Panel.Headline')
return this.$t(`Panels.${panelName}Panel.Headline`)
}

return this.$t('Panels.' + capitalize(name) + 'Panel.Headline')
return this.$t(`Panels.${capitalize(name)}Panel.Headline`)
}
}
6 changes: 5 additions & 1 deletion src/components/panels/.i18nignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ $t('History.StatusValues.error')
$t('History.StatusValues.in_progress')
$t('History.StatusValues.klippy_disconnect')
$t('History.StatusValues.klippy_shutdown')
$t('History.StatusValues.server_exit')
$t('History.StatusValues.server_exit')
$t('Panels.TemperaturePanel.Dataset.Power')
$t('Panels.TemperaturePanel.Dataset.Speed')
$t('Panels.TemperaturePanel.Dataset.Target')
$t('Panels.TemperaturePanel.Dataset.Temperature')
14 changes: 4 additions & 10 deletions src/components/panels/TemperaturePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,7 @@
v-model="editHeater['bool' + dataset.charAt(0).toUpperCase() + dataset.slice(1)]"
:label="
$t('Panels.TemperaturePanel.ShowNameInChart', {
name: $t(
'Panels.TemperaturePanel.Dataset.' +
dataset.charAt(0).toUpperCase() +
dataset.slice(1)
),
name: $t(`Panels.TemperaturePanel.Dataset.${capitalize(dataset)}`),
})
"
hide-details
Expand Down Expand Up @@ -244,7 +240,7 @@
<script lang="ts">
import Component from 'vue-class-component'
import { Mixins } from 'vue-property-decorator'
import { convertName } from '@/plugins/helpers'
import { capitalize, convertName } from '@/plugins/helpers'
import { Debounce } from 'vue-debounce-decorator'
import { GuiPresetsStatePreset } from '@/store/gui/presets/types'
import { PrinterStateTemperatureObject } from '@/store/printer/types'
Expand All @@ -254,14 +250,12 @@ import TempChart from '@/components/charts/TempChart.vue'
import TemperatureInput from '@/components/inputs/TemperatureInput.vue'
import Panel from '@/components/ui/Panel.vue'
import Responsive from '@/components/ui/Responsive.vue'
import { datasetTypes } from '@/store/variables'
import { mdiCloseThick, mdiCog, mdiFan, mdiSnowflake, mdiFire, mdiMenuDown, mdiThermometerLines } from '@mdi/js'
import { mdiCloseThick, mdiCog, mdiSnowflake, mdiFire, mdiMenuDown, mdiThermometerLines } from '@mdi/js'

@Component({
components: { Panel, TempChart, TemperatureInput, Responsive },
})
export default class TemperaturePanel extends Mixins(BaseMixin, ControlMixin) {
mdiFan = mdiFan
mdiSnowflake = mdiSnowflake
mdiCloseThick = mdiCloseThick
mdiCog = mdiCog
Expand All @@ -270,7 +264,7 @@ export default class TemperaturePanel extends Mixins(BaseMixin, ControlMixin) {
mdiThermometerLines = mdiThermometerLines

convertName = convertName
datasetTypes = datasetTypes
capitalize = capitalize

private editHeater: any = {
bool: false,
Expand Down
2 changes: 1 addition & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_last_update:": "26.05.2022",
"_last_update": "26.05.2022",
"App": {
"Notifications": {
"KlipperWarnings": {
Expand Down
2 changes: 1 addition & 1 deletion src/locales/ko-kr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_last_update:": "12.06.2022",
"_last_update": "12.06.2022",
"App": {
"Notifications": {
"DependencyDescription": "{neededVersion} 버전 이상으로 업데이트 해야 정상 사용이 가능합니다",
Expand Down