Skip to content

Commit

Permalink
Move localized strings into the Swift package, where they are used.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Aug 24, 2023
1 parent dcaee8c commit 090075e
Show file tree
Hide file tree
Showing 71 changed files with 8 additions and 212 deletions.
1 change: 1 addition & 0 deletions src/cordova/apple/OutlineAppleLib/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PackageDescription

let package = Package(
name: "OutlineAppleLib",
defaultLocalization: "en",
products: [
.library(
name: "OutlineAppleLib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@
private enum MenuTitle {
static let open = NSLocalizedString(
"tray_open_window",
bundle: .module,
comment: "Tray menu entry to show the application window.")
static let quit = NSLocalizedString(
"quit",
bundle: .module,
comment: "Tray menu entry to quit the application.")
static let statusConnected = NSLocalizedString(
"connected_server_state",
bundle: .module,
comment: "Tray menu entry indicating a server is currently connected and in use.")
static let statusDisconnected = NSLocalizedString(
"disconnected_server_state",
bundle: .module,
comment: "Tray menu entry indicating no server is currently connected.")
}

Expand Down
2 changes: 1 addition & 1 deletion src/cordova/apple/import_messages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import path from 'path';
import I18N from 'i18n-strings-files';

const STRINGS_DIR = ['src', 'cordova', 'apple', 'xcode', 'ios', 'Outline', 'Resources'];
const STRINGS_DIR = ['src', 'cordova', 'apple', 'OutlineAppleLib', 'Sources', 'OutlineAppKitBridge', 'Resources', 'Strings'];
const STRINGS_FILENAME = 'Localizable.strings';

function getNativeLocale(locale) {
Expand Down
211 changes: 0 additions & 211 deletions src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/cordova/apple/xcode/ios/Outline/Outline-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string>0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSUIElement</key>
Expand Down

0 comments on commit 090075e

Please sign in to comment.