From a73af6f1a722a4cdb943e4d46d1dc21f7652740a Mon Sep 17 00:00:00 2001 From: Jack Taylor Date: Fri, 20 Mar 2020 22:39:50 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=A8=80=E8=AA=9E=EF=BC=9A=E9=99=BD?= =?UTF-8?q?=E6=80=A7=E8=80=85=E3=81=AE=E5=B1=9E=E6=80=A7=E3=81=AE=E5=B9=B4?= =?UTF-8?q?=E4=BB=A3=E5=87=A6=E7=90=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「nn代」の値を最初にチェックするように修正。これで他の値は翻訳 データの追加たけで対応できる。 --- pages/index.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 8ddbb14b226fe..66b74b0482f7f 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -296,15 +296,12 @@ export default { if (row['性別'] === '非公表性'){ row['性別'] = this.$t('非公表') } - if (row['年代'] === '10歳未満') { - row['年代'] = this.$t('10歳未満') - } - else if (row['年代'] === '非公表'){ - row['年代'] = this.$t('非公表') + const match = row['年代'].match(/^([0-9]+)代$/) + if (match) { + row['年代'] = this.$t('{age}代', { age: match[1] }) } else { - const age = row['年代'].substring(0, 2) - row['年代'] = this.$t('{age}代', { age }) + row['年代'] = this.$t(row['年代']) } } this.patients.last_update = response.last_update;