Skip to content

Commit

Permalink
add jp locale ("sort of" fixes #108) (#120)
Browse files Browse the repository at this point in the history
* add jp locale

* change translations to sound more natural

Co-authored-by: Chris <ccbrown112@gmail.com>

---------

Co-authored-by: Chris <ccbrown112@gmail.com>
  • Loading branch information
derekmcq and ccbrown authored Dec 11, 2023
1 parent b1e2421 commit 6b61fb6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions aws-sam/gggtracker.cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
11 changes: 11 additions & 0 deletions server/localization.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Binary file added server/static/images/locales/jp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6b61fb6

Please sign in to comment.