Skip to content

Commit

Permalink
Merge pull request #6 from NatLibFi/simplye-215-circulation-translations
Browse files Browse the repository at this point in the history
Simplye 215 circulation translations
  • Loading branch information
jompu authored Mar 14, 2024
2 parents 30f3225 + 2dd105d commit ccb2eaf
Show file tree
Hide file tree
Showing 9 changed files with 360 additions and 88 deletions.
100 changes: 14 additions & 86 deletions Palace.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion Palace/Network/TPPNetworkExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,15 @@ extension TPPNetworkExecutor {
headers.forEach { urlRequest.setValue($0.value, forHTTPHeaderField: $0.key) }
}

urlRequest.setValue("", forHTTPHeaderField: "Accept-Language")
var preferredLocalizations:String = Bundle.main.preferredLocalizations[0]
if Bundle.main.preferredLocalizations.count > 1 {
preferredLocalizations += ", \(Bundle.main.preferredLocalizations[1]);q=0.9"
}
if Bundle.main.preferredLocalizations.count > 2 {
preferredLocalizations += ", \(Bundle.main.preferredLocalizations[2]);q=0.8"
}

urlRequest.setValue(preferredLocalizations, forHTTPHeaderField: "Accept-Language")
return urlRequest
}

Expand Down
2 changes: 1 addition & 1 deletion Palace/Utilities/Localization/Transifex/txstrings.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Palace/fi.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NSLocationWhenInUseUsageDescription =
"This app needs to check your location to see if you can be issued a library card.";
166 changes: 166 additions & 0 deletions Palace/fi.lproj/Localizable.stringsdict
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>year_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@year@</string>
<key>year</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 year</string>
<key>other</key>
<string>%d years</string>
</dict>
</dict>
<key>year_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@year@</string>
<key>year</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 y</string>
<key>other</key>
<string>%d y</string>
</dict>
</dict>
<key>month_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@month@</string>
<key>month</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 month</string>
<key>other</key>
<string>%d months</string>
</dict>
</dict>
<key>month_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@month@</string>
<key>month</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 m</string>
<key>other</key>
<string>%d m</string>
</dict>
</dict>
<key>week_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@week@</string>
<key>week</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 week</string>
<key>other</key>
<string>%d weeks</string>
</dict>
</dict>
<key>week_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@week@</string>
<key>week</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 w</string>
<key>other</key>
<string>%d w</string>
</dict>
</dict>
<key>day_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@day@</string>
<key>day</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 day</string>
<key>other</key>
<string>%d days</string>
</dict>
</dict>
<key>day_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@day@</string>
<key>day</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 d</string>
<key>other</key>
<string>%d d</string>
</dict>
</dict>
<key>hour_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@hour@</string>
<key>hour</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 hour</string>
<key>other</key>
<string>%d hours</string>
</dict>
</dict>
<key>hour_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@hour@</string>
<key>hour</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 h</string>
<key>other</key>
<string>%d h</string>
</dict>
</dict>
</dict>
</plist>
2 changes: 2 additions & 0 deletions Palace/sv.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NSLocationWhenInUseUsageDescription =
"This app needs to check your location to see if you can be issued a library card.";
166 changes: 166 additions & 0 deletions Palace/sv.lproj/Localizable.stringsdict
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>year_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@year@</string>
<key>year</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 year</string>
<key>other</key>
<string>%d years</string>
</dict>
</dict>
<key>year_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@year@</string>
<key>year</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 y</string>
<key>other</key>
<string>%d y</string>
</dict>
</dict>
<key>month_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@month@</string>
<key>month</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 month</string>
<key>other</key>
<string>%d months</string>
</dict>
</dict>
<key>month_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@month@</string>
<key>month</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 m</string>
<key>other</key>
<string>%d m</string>
</dict>
</dict>
<key>week_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@week@</string>
<key>week</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 week</string>
<key>other</key>
<string>%d weeks</string>
</dict>
</dict>
<key>week_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@week@</string>
<key>week</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 w</string>
<key>other</key>
<string>%d w</string>
</dict>
</dict>
<key>day_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@day@</string>
<key>day</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 day</string>
<key>other</key>
<string>%d days</string>
</dict>
</dict>
<key>day_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@day@</string>
<key>day</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 d</string>
<key>other</key>
<string>%d d</string>
</dict>
</dict>
<key>hour_suffix_long</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@hour@</string>
<key>hour</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 hour</string>
<key>other</key>
<string>%d hours</string>
</dict>
</dict>
<key>hour_suffix_short</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@hour@</string>
<key>hour</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 h</string>
<key>other</key>
<string>%d h</string>
</dict>
</dict>
</dict>
</plist>
Empty file.
Empty file.

0 comments on commit ccb2eaf

Please sign in to comment.