From 9fc22f58b24548a949d18bfe7fd1188927e9529d Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 2 Dec 2023 00:06:49 -0600 Subject: [PATCH 1/2] add jp locale --- aws-sam/gggtracker.cfn.yaml | 15 +++++++++++++++ server/localization.go | 11 +++++++++++ server/static/images/locales/jp.png | Bin 0 -> 209 bytes 3 files changed, 26 insertions(+) create mode 100644 server/static/images/locales/jp.png diff --git a/aws-sam/gggtracker.cfn.yaml b/aws-sam/gggtracker.cfn.yaml index 2001a87..b6bf81a 100644 --- a/aws-sam/gggtracker.cfn.yaml +++ b/aws-sam/gggtracker.cfn.yaml @@ -89,6 +89,13 @@ Resources: DomainName: !Sub www.${DomainName} RestApiId: !Ref API Stage: !Ref APIStage + APIBasePathMappingSubdomain8: + Type: AWS::ApiGateway::BasePathMapping + DependsOn: APISubdomainName8 + Properties: + DomainName: !Sub jp.${DomainName} + RestApiId: !Ref API + Stage: !Ref APIStage APICloudWatchRole: Type: AWS::IAM::Role Properties: @@ -165,6 +172,14 @@ Resources: EndpointConfiguration: Types: - EDGE + APISubdomainName8: + Type: AWS::ApiGateway::DomainName + Properties: + CertificateArn: !Ref CertificateARN + DomainName: !Sub jp.${DomainName} + EndpointConfiguration: + Types: + - EDGE APIProxyResource: Type: AWS::ApiGateway::Resource Properties: diff --git a/server/localization.go b/server/localization.go index d558f98..9803204 100644 --- a/server/localization.go +++ b/server/localization.go @@ -155,6 +155,17 @@ var Locales = []*Locale{ "Forum": "Foro", }, }, + { + Subdomain: "jp", + Image: "static/images/locales/jp.png", + Translations: map[string]string{ + "Activity": "活動", + "Thread": "糸", + "Poster": "著者", + "Time": "時間", + "Forum": "フォーラム", + }, + }, } func LocaleForRequest(r *http.Request) *Locale { diff --git a/server/static/images/locales/jp.png b/server/static/images/locales/jp.png new file mode 100644 index 0000000000000000000000000000000000000000..a432ef8738649d935444480e6b5f69757707a92c GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^B0$W~!3-oXyUC{mDc1m>5ZC|z|9^k{;)G%7RtE8t zMq%F{J^y(2+9n46oeV0w8MHSs2z)$qbq9m;E(Xm#47xiRl;0gZ^X|}@r*qbBV~}|| zXWhF)XFr|2R(Q#|8EBxpr;B5V#O36K1zZU!Noi?`uA<4w&mTN_^5Bu1;FE_>nVI71 zQVbc>>)QT6}; literal 0 HcmV?d00001 From 6ee99c423765b85e5741aa45c3801f533c92b9f0 Mon Sep 17 00:00:00 2001 From: derekmcq <152669322+derekmcq@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:38:02 -0600 Subject: [PATCH 2/2] change translations to sound more natural Co-authored-by: Chris --- server/localization.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/localization.go b/server/localization.go index 9803204..f09210e 100644 --- a/server/localization.go +++ b/server/localization.go @@ -159,10 +159,10 @@ var Locales = []*Locale{ Subdomain: "jp", Image: "static/images/locales/jp.png", Translations: map[string]string{ - "Activity": "活動", - "Thread": "糸", - "Poster": "著者", - "Time": "時間", + "Activity": "アクティビティ", + "Thread": "スレッド", + "Poster": "投稿者", + "Time": "日時", "Forum": "フォーラム", }, },