Skip to content

Commit

Permalink
Add localizable name for WordPress app on App Store (#18120)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored Mar 11, 2022
2 parents bbee2a8 + d96bc80 commit d328080
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions WordPress/Resources/AppStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ msgstr ""
"Last-Translator: \n"
"Language-Team: \n"

#. translators: The application name in the Apple App Store. Please keep the brand name ('WordPress') verbatim. Limit to 30 characters including spaces and punctuation!
msgctxt "app_store_name"
msgid "WordPress – Website Builder"
msgstr ""

#. translators: Subtitle to be displayed below the application name in the Apple App Store. Limit to 30 characters including spaces and commas!
msgctxt "app_store_subtitle"
msgid "Design a site, build a blog"
Expand Down
1 change: 1 addition & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ platform :ios do

files = {
whats_new: File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Resources', 'release_notes.txt'),
app_store_name: File.join(source_metadata_folder, 'name.txt'),
app_store_subtitle: File.join(source_metadata_folder, 'subtitle.txt'),
app_store_desc: File.join(source_metadata_folder, 'description.txt'),
app_store_keywords: File.join(source_metadata_folder, 'keywords.txt'),
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Jetpack-Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ lane :update_jetpack_appstore_strings do |options|
'screenshot-text-4' => File.join(source_metadata_folder, 'promo_screenshot_4.txt'),
'screenshot-text-5' => File.join(source_metadata_folder, 'promo_screenshot_5.txt'),
'screenshot-text-6' => File.join(source_metadata_folder, 'promo_screenshot_6.txt'),
'app-store-name' => File.join(source_metadata_folder, 'app_name.txt')
app_store_name: File.join(source_metadata_folder, 'name.txt')
}

ios_update_metadata_source(
Expand Down
1 change: 1 addition & 0 deletions fastlane/appstoreres/metadata/source/name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WordPress – Website Builder
5 changes: 5 additions & 0 deletions fastlane/download_metadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import Foundation

let glotPressNameKey = "app_store_name"
let glotPressSubtitleKey = "app_store_subtitle"
let glotPressWhatsNewKey = "v19.4-whats-new"
let glotPressDescriptionKey = "app_store_desc"
Expand Down Expand Up @@ -90,6 +91,7 @@ func downloadTranslation(
return
}

var name: String?
var subtitle: String?
var whatsNew: String?
var keywords: String?
Expand All @@ -114,6 +116,8 @@ func downloadTranslation(
let translation = languageCode == "en-us" ? originalLanguage : firstValue

switch keyFirstPart {
case glotPressNameKey:
name = translation
case glotPressSubtitleKey:
subtitle = translation
case glotPressKeywordsKey:
Expand Down Expand Up @@ -141,6 +145,7 @@ func downloadTranslation(
try FileManager.default.removeItem(at: URL(fileURLWithPath: releaseNotesPath))
}

try name?.write(toFile: "\(languageFolder)/name.txt", atomically: true, encoding: .utf8)
try subtitle?.write(toFile: "\(languageFolder)/subtitle.txt", atomically: true, encoding: .utf8)
try whatsNew?.write(toFile: "\(languageFolder)/release_notes.txt", atomically: true, encoding: .utf8)
try keywords?.write(toFile: "\(languageFolder)/keywords.txt", atomically: true, encoding: .utf8)
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/default/name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WordPress – Website Builder

0 comments on commit d328080

Please sign in to comment.