FIX: localize S3 region names

This commit is contained in:
Régis Hanol 2016-01-19 17:14:45 +01:00
parent 5018a8033d
commit 11ea16a91a
2 changed files with 21 additions and 2 deletions

View file

@ -6,7 +6,7 @@ class S3RegionSiteSetting < EnumSiteSetting
end
def self.values
@values ||= valid_values.sort.map { |x| { name: x, value: x } }
@values ||= valid_values.sort.map { |x| { name: "s3.regions.#{x.tr("-", "_")}", value: x } }
end
def self.valid_values
@ -20,7 +20,12 @@ class S3RegionSiteSetting < EnumSiteSetting
'ap-southeast-2',
'ap-northeast-1',
'ap-northeast-2',
'sa-east-1']
'sa-east-1'
]
end
def self.translate_names?
true
end
private_class_method :valid_values

View file

@ -145,6 +145,20 @@ en:
emails_are_disabled: "All outgoing email has been globally disabled by an administrator. No email notifications of any kind will be sent."
s3:
regions:
us_east_1: "US East (N. Virginia)"
us_west_1: "US West (N. California)"
us_west_2: "US West (Oregon)"
us_gov_west_1: "AWS GovCloud (US)"
eu_west_1: "EU (Ireland)"
eu_central_1: "EU (Frankfurt)"
ap_southeast_1: "Asia Pacific (Singapore)"
ap_southeast_2: "Asia Pacific (Sydney)"
ap_northeast_1: "Asia Pacific (Tokyo)"
ap_northeast_2: "Asia Pacific (Seoul)"
sa_east_1: "South America (Sao Paulo)"
edit: 'edit the title and category of this topic'
not_implemented: "That feature hasn't been implemented yet, sorry!"
no_value: "No"