From e700bf4cecea26ae59412939265613f3a6fc3545 Mon Sep 17 00:00:00 2001 From: SeanHsieh Date: Sat, 22 Jul 2023 15:55:43 +0800 Subject: [PATCH] feat: update en i18n and ui on venue --- components/venue/VenueDivision.vue | 5 +- components/venue/VenueDriveTab.vue | 30 +++++++-- .../venue/VenuePublicTransporterTab.vue | 44 +++++++++++-- i18n/venue/index.i18n.js | 61 +++++++++++++++---- .../venue/en-us/publicTransporterGuide-md.svg | 9 +++ .../venue/en-us/publicTransporterGuide.svg | 9 +++ .../img/venue/en-us/venue-destination-md.svg | 6 ++ static/img/venue/en-us/venue-destination.svg | 6 ++ 8 files changed, 146 insertions(+), 24 deletions(-) create mode 100644 static/img/venue/en-us/publicTransporterGuide-md.svg create mode 100644 static/img/venue/en-us/publicTransporterGuide.svg create mode 100644 static/img/venue/en-us/venue-destination-md.svg create mode 100644 static/img/venue/en-us/venue-destination.svg diff --git a/components/venue/VenueDivision.vue b/components/venue/VenueDivision.vue index 74640ea950..ffcc9ff0b7 100644 --- a/components/venue/VenueDivision.vue +++ b/components/venue/VenueDivision.vue @@ -20,7 +20,7 @@ export default { white-space: nowrap; color: #9387ff; - &>>>h3 { + & >>> h3 { padding: 0 14px; position: relative; display: flex; @@ -65,4 +65,5 @@ export default { border-top: 1px solid #9387ff; display: inline-block; } -} +} + diff --git a/components/venue/VenueDriveTab.vue b/components/venue/VenueDriveTab.vue index 9ccfe32b0a..eef9a81c78 100644 --- a/components/venue/VenueDriveTab.vue +++ b/components/venue/VenueDriveTab.vue @@ -118,7 +118,25 @@ export default { components: { VenueDivision }, data() { return { - icon: { + parkingInfo: { + car: '人社館地下室設有汽車停車場,車輛進入院區持證件向大門警衛換證後可駛入院區,停車費用每小時20元。', + }, + } + }, + computed: { + icon() { + if (this.$i18n.locale === 'en-us') { + return { + car: require('~/static/img/venue/car.svg'), + carWhite: require('~/static/img/venue/car-white.svg'), + motorWhite: require('~/static/img/venue/motor-white.svg'), + parking: require('~/static/img/venue/parking.svg'), + parkingPink: require('~/static/img/venue/parking-pink.svg'), + venueDestination: require('~/static/img/venue/en-us/venue-destination.svg'), + venueDestinationMd: require('~/static/img/venue/en-us/venue-destination-md.svg'), + } + } + return { car: require('~/static/img/venue/car.svg'), carWhite: require('~/static/img/venue/car-white.svg'), motorWhite: require('~/static/img/venue/motor-white.svg'), @@ -126,11 +144,11 @@ export default { parkingPink: require('~/static/img/venue/parking-pink.svg'), venueDestination: require('~/static/img/venue/venue-destination.svg'), venueDestinationMd: require('~/static/img/venue/venue-destination-md.svg'), - }, - parkingInfo: { - car: '人社館地下室設有汽車停車場,車輛進入院區持證件向大門警衛換證後可駛入院區,停車費用每小時20元。', - }, - } + } + }, + }, + mounted() { + console.log(this.$i18n.locale) }, } diff --git a/components/venue/VenuePublicTransporterTab.vue b/components/venue/VenuePublicTransporterTab.vue index 9c85c7ea4d..d3ed538ea2 100644 --- a/components/venue/VenuePublicTransporterTab.vue +++ b/components/venue/VenuePublicTransporterTab.vue @@ -73,7 +73,7 @@ -

+

{{ $t('publicTransport.title') }}

@@ -136,7 +136,23 @@
  • - {{ $t('publicTransportInfo.description3') }} + {{ $t('publicTransportInfo.description3.title') }} +
      +
    • + {{ + $t( + 'publicTransportInfo.description3.info1', + ) + }} +
    • +
    • + {{ + $t( + 'publicTransportInfo.description3.info2', + ) + }} +
    • +
  • {{ $t('publicTransportInfo.description4') }} @@ -202,7 +218,25 @@ export default { i18nLinkPath: 'publicTransport.uBikePark.parkPlace.park5', }, ], - icon: { + } + }, + + computed: { + icon() { + if (this.$i18n.locale === 'en-us') { + return { + carWhite: require('~/static/img/venue/car-white.svg'), + busWhite: require('~/static/img/venue/bus-white.svg'), + publicTransporterGuide: require('~/static/img/venue/en-us/publicTransporterGuide.svg'), + publicTransporterGuideMd: require('~/static/img/venue/en-us/publicTransporterGuide-md.svg'), + taxiWhite: require('~/static/img/venue/taxi-white.svg'), + transporterWhite: require('~/static/img/venue/transporter-white.svg'), + uBike: require('~/static/img/venue/uBike.svg'), + parking: require('~/static/img/venue/parking.svg'), + airplane: require('~/static/img/venue/airplane.svg'), + } + } + return { carWhite: require('~/static/img/venue/car-white.svg'), busWhite: require('~/static/img/venue/bus-white.svg'), publicTransporterGuide: require('~/static/img/venue/publicTransporterGuide.svg'), @@ -212,8 +246,8 @@ export default { uBike: require('~/static/img/venue/uBike.svg'), parking: require('~/static/img/venue/parking.svg'), airplane: require('~/static/img/venue/airplane.svg'), - }, - } + } + }, }, } diff --git a/i18n/venue/index.i18n.js b/i18n/venue/index.i18n.js index de4db29be4..ac3832a198 100644 --- a/i18n/venue/index.i18n.js +++ b/i18n/venue/index.i18n.js @@ -36,8 +36,9 @@ export default genI18nMessages({ title: 'Parking Info', car: { title: 'Car', + parkingPlace: 'Humanities and Social Science Building (HSSB)', description: - 'The underground parking lot (B2) in the Humanities and Social Science Building is available for cars. ' + + 'The underground parking lot (B2) in the {0} is available for cars. ' + 'Upon entering the campus, drivers should present their identification to the main gate security guard' + ' and obtain a parking permit. The parking fee is NT$20 per hour.', }, @@ -63,6 +64,11 @@ export default genI18nMessages({ ' Based on past experience, many people choose this option,' + ' so sharing a taxi from the MRT station is a good idea.', }, + bus: { + title: 'Passenger bus', + description: + "To reach Academia Sinica, you can take buses 205, 212, 212 直 (212 Express), 270, 270 區 (270 Shuttle), 276, 306, 306 區 (306 Shuttle), 620, 645, 645 副 (645 Sub), S1, S12, 小 12 區 (S12 Shuttle), S5, or 藍 25 (Blue 25), and get off at Academia Sinica Station. From there, it's approximately an 8-minute walk to your destination.", + }, uBike: { link: { description1: 'official YouBike website', @@ -74,25 +80,54 @@ export default genI18nMessages({ 'It is recommended to check the available docking stations on the app to return the bike. {2}' + 'Cycling time from Nangang Station or Nangang Exhibition Center Station to Academia Sinica is approximately 10-15 minutes', }, + uBikePark: { + parkPlace: { + park1: 'YouBike 2.0: Humanities and Social Science Building', + park2: 'YouBike 2.0: Academia Sinica Gymnasium (East)', + park3: 'YouBike 2.0: Academia Sinica (Jiuzhuang St. Intersection)', + park4: 'YouBike 2.0: Academia Park', + park5: 'YouBike 2.0: Dr. Hu Shih Par', + }, + parkingInfo: { + park1: '{0}', + park2: '{0}', + park3: '{0} — Approximately a 10-minute walk', + park4: '{0} — Approximately a 12-minute walk', + park5: '{0} — Approximately a 13-minute walk', + }, + title: 'Youbike 附近租賃站點', + }, }, publicTransportInfo: { - title: 'Way of Transportation', + title: 'Public transportation', info: - 'You can take the Kuo-Kuang Bus 1843 to travel between Nangang Exhibition' + + 'You can take the {0} to travel between Nangang Exhibition' + ' Center and Terminal 1 and Terminal 2 of Taoyuan International Airport.', - '1843infoTitle': 'Kuo-Kuang Bus 1843 Route Information:', + '1843infoTitle': '{0} Route Information:', + publicTransport: 'Kuo-Kuang Bus 1843', + description1: 'Route: Taiwan Taoyuan Airport Terminal 1 ->' + ' Taiwan Taoyuan Airport Terminal 2 -> MRT Gangqian Station' + ' -> Ruiguang Road -> Neihu Administrative Center ->' + ' MRT Nangang Exhibition Center Station (Nangang Rd.) -> Nangang Bus Station (West)', - description2: - 'Bus platform location: Terminal I: B1 bus area of' + - ' Arrivals Hall Terminal II: Outdoor gallery at East side of 1F Arrivals Hall', - description3: - 'Fare (for reference only):Full Fare: NT$140,Half Fare: NT$75', - description4: 'Schedule: 09:10, 13:10, and 17:20', + description2: { + title: 'Bus platform location:', + info1: 'Terminal I: B1 bus area of Arrivals Hall', + info2: 'Terminal II: Outdoor gallery at East side of 1F Arrivals Hall', + }, + description3: { + title: 'Fare (for reference only):', + info1: 'Fare: NT$140', + info2: 'Fare: NT$75', + }, + description4: 'Schedule: 09:10, 13:10, and 17:20, From Terminal II', description5: 'Estimated time: 1 hour with moderate traffic', + moreInfo: { + title: 'For more information, please refer to {0} and {1} 。', + info1: 'the traffic information of Academia Sinica', + info2: 'the public transportation information of Taoyuan international Airport', + }, }, }, 'zh-hant': { @@ -197,7 +232,11 @@ export default genI18nMessages({ info1: '第一航廈:B1 層巴士乘車區。', info2: '第二航廈:1F 層巴士乘車區。', }, - description3: '票價(票價僅供參考):全票 NT$140,半票 NT$75', + description3: { + title: '票價(票價僅供參考):', + info1: '全票 NT$140', + info2: '半票 NT$75', + }, description4: '時間:09:10、13:10、17:20,從第二航廈發車', description5: '路程時間:一般交通狀況下一小時', moreInfo: { diff --git a/static/img/venue/en-us/publicTransporterGuide-md.svg b/static/img/venue/en-us/publicTransporterGuide-md.svg new file mode 100644 index 0000000000..ddfeb18013 --- /dev/null +++ b/static/img/venue/en-us/publicTransporterGuide-md.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/static/img/venue/en-us/publicTransporterGuide.svg b/static/img/venue/en-us/publicTransporterGuide.svg new file mode 100644 index 0000000000..79673da2d6 --- /dev/null +++ b/static/img/venue/en-us/publicTransporterGuide.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/static/img/venue/en-us/venue-destination-md.svg b/static/img/venue/en-us/venue-destination-md.svg new file mode 100644 index 0000000000..ecf2275716 --- /dev/null +++ b/static/img/venue/en-us/venue-destination-md.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/static/img/venue/en-us/venue-destination.svg b/static/img/venue/en-us/venue-destination.svg new file mode 100644 index 0000000000..29664864ab --- /dev/null +++ b/static/img/venue/en-us/venue-destination.svg @@ -0,0 +1,6 @@ + + + + + +