mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Organize localizable data
This commit is contained in:
parent
5fefa787ca
commit
9bb5e9447e
@ -14,6 +14,7 @@
|
||||
- Make the encoding priority view undoable.
|
||||
- [trivial] Enable delete selected separators in the encoding priority view with the Delete key.
|
||||
- [dev] Migrate the settings window and syntax editor to SwiftUI.
|
||||
- [dev] Migrate all localizable strings to String Catalogs.
|
||||
- [dev] Update the build environment to Xcode 15.3 (Swift 5.10).
|
||||
|
||||
|
||||
|
@ -32,9 +32,7 @@ By adding code, please follow our coding style guide below.
|
||||
|
||||
### Localization
|
||||
|
||||
_2023-08-01: CotEditor project now gradually migrates the localization format to the strings catalog that is newly introduced in Xcode 15. We will update the technical localization policy when the migration has completely done._
|
||||
|
||||
Fixing/updating existing localizations is always welcome. The project team adds `FIXME:` tag as a comment in the localized strings files if there are updated strings to be localized.
|
||||
Fixing/updating existing localizations is always welcome. See each .xcstrings file to find which strings need to be localized or reviewed by native speaker. By localization, please refer to the comments and key naming so that you can know where and how each string will be used. If you have uncertainty, feel free to ask @1024jp.
|
||||
|
||||
If your localization makes some layout in views destroy, try first making the sentence shorter. However, if it's impossible, then just tell us about it with a screenshot when you make a pull-request. We'll update the view to layout your localized text correctly.
|
||||
|
||||
@ -42,8 +40,10 @@ If your localization makes some layout in views destroy, try first making the se
|
||||
|
||||
Currently, the CotEditor project only accepts new localizations whose provider can maintain the localization thereafter. Please explicitly tell us if you also intend to be a localization maintainer when submitting a new localization. The standard maintenance process of a localization is described in the subsection below.
|
||||
|
||||
To create a new localization, copy one of a whole .lproj directory and use it as a template. We recommend using `CotEditor/en-GB.lproj/` directory because they are always up-to-date. In addition, add localization also to the .xcstrings files in the `mul.lproj` directory.
|
||||
Note that you don't need to localize the Unicode block names in the `UnicodeBlock.strings` file. It will be done by @1024jp based on the localization data by Apple.
|
||||
To create a new localization, go to Projects > CotEditor > Info > Localizations in Xcode and add your language to the table. Because CotEditor currently uses the String Catalog format (.xcstrings) first introduced in Xcode 15 released in 2023, we recommend you to edit localizations in Xcode. In the Resources group in the project, you can find all strings files (.xcstrings) both in the Localizations and Storyboards subgroups. The new language you added will automatically be appeared in the catalog list. Select your language and fill each cell of your language column in the table.
|
||||
Note that you don't need to localize the UnicodeBlock.strings file. It will be done by @1024jp based on the localization data by Apple.
|
||||
|
||||
- cf. [Localizing and varying text with a string catalog](https://developer.apple.com/documentation/xcode/localizing-and-varying-text-with-a-string-catalog)
|
||||
|
||||
#### Localization maintenance process
|
||||
|
||||
|
@ -1614,14 +1614,14 @@
|
||||
name = "Bidi Scroll View";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A1E7DE72B8D615A004F0C07 /* TextFind */ = {
|
||||
2A1E7DE72B8D615A004F0C07 /* Text Finder */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A954B232AB28B010070FB74 /* TextFind.xcstrings */,
|
||||
2A1E7DE42B8D6102004F0C07 /* MultipleReplace.xcstrings */,
|
||||
2AC94B3A2B6EAAE90086F9F2 /* RegexReference.xcstrings */,
|
||||
);
|
||||
name = TextFind;
|
||||
name = "Text Finder";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A2184121D0426E800522EF5 /* Window */ = {
|
||||
@ -1820,7 +1820,7 @@
|
||||
path = CotEditor;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A39AC942B8CE43100E216C9 /* AccessoryViews */ = {
|
||||
2A39AC942B8CE43100E216C9 /* Accessory Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A1E7DF92B8D67B3004F0C07 /* PrintAccessory.xcstrings */,
|
||||
@ -1836,7 +1836,7 @@
|
||||
2A55D5D72B7A728A0092DE48 /* AdvancedCharacterCount.xcstrings */,
|
||||
2A39ACA72B8CE58100E216C9 /* LiveTextInsertion.xcstrings */,
|
||||
);
|
||||
name = AccessoryViews;
|
||||
name = "Accessory Views";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A3E61C627C4962B00C6E5B6 /* Formatters */ = {
|
||||
@ -2166,6 +2166,41 @@
|
||||
name = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2AA6731E2B917B6500B8F7E6 /* Document Window */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2AA672A12B8F8AA300B8F7E6 /* DocumentWindow.xcstrings */,
|
||||
2A7FEF1D2B90C7050042BEFF /* Toolbar.xcstrings */,
|
||||
2AC94B212B6E26F40086F9F2 /* Inspector.xcstrings */,
|
||||
);
|
||||
name = "Document Window";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2AA6731F2B917B8F00B8F7E6 /* Other Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A65EC3A2B80C667008096C5 /* ThemeEditor.xcstrings */,
|
||||
2AA6E0B82B744FF300E536F8 /* SyntaxEditor.xcstrings */,
|
||||
2A39AC802B8CDFC800E216C9 /* EncodingList.xcstrings */,
|
||||
2A1E7E292B8D7414004F0C07 /* SyntaxMappingConflict.xcstrings */,
|
||||
);
|
||||
name = "Other Views";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2AA673202B917BA400B8F7E6 /* Panes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2ACDA2932B81E8B300B2EBA8 /* GeneralSettings.xcstrings */,
|
||||
2ACDA2A72B81EE0E00B2EBA8 /* AppearanceSettings.xcstrings */,
|
||||
2ACDA2962B81E8B700B2EBA8 /* EditSettings.xcstrings */,
|
||||
2ACDA2992B81E8BB00B2EBA8 /* WindowSettings.xcstrings */,
|
||||
2ACDA29C2B81E8BF00B2EBA8 /* SnippetsSettings.xcstrings */,
|
||||
2AB9E4C22B830902004E5BDC /* FormatSettings.xcstrings */,
|
||||
2A1E7DCB2B889A1F004F0C07 /* KeyBindingsSettings.xcstrings */,
|
||||
);
|
||||
name = Panes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2AB1BD21287D752300C6FEAF /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -2198,13 +2233,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A1E7E5F2B8DC879004F0C07 /* Settings.xcstrings */,
|
||||
2ACDA2932B81E8B300B2EBA8 /* GeneralSettings.xcstrings */,
|
||||
2ACDA2A72B81EE0E00B2EBA8 /* AppearanceSettings.xcstrings */,
|
||||
2ACDA2962B81E8B700B2EBA8 /* EditSettings.xcstrings */,
|
||||
2ACDA2992B81E8BB00B2EBA8 /* WindowSettings.xcstrings */,
|
||||
2ACDA29C2B81E8BF00B2EBA8 /* SnippetsSettings.xcstrings */,
|
||||
2AB9E4C22B830902004E5BDC /* FormatSettings.xcstrings */,
|
||||
2A1E7DCB2B889A1F004F0C07 /* KeyBindingsSettings.xcstrings */,
|
||||
2AA673202B917BA400B8F7E6 /* Panes */,
|
||||
2AA6731F2B917B8F00B8F7E6 /* Other Views */,
|
||||
);
|
||||
name = Settings;
|
||||
sourceTree = "<group>";
|
||||
@ -2233,25 +2263,19 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2AA6731B2B9178AB00B8F7E6 /* Localizable.xcstrings */,
|
||||
2A5E6FC32A723CE900E33EA7 /* InfoPlist.xcstrings */,
|
||||
2A5E6FC62A723F3C00E33EA7 /* ServicesMenu.xcstrings */,
|
||||
2AA672F52B916DA400B8F7E6 /* MainMenu.xcstrings */,
|
||||
2AB9E4BB2B7F2378004E5BDC /* Settings */,
|
||||
2A65EC3A2B80C667008096C5 /* ThemeEditor.xcstrings */,
|
||||
2AA6E0B82B744FF300E536F8 /* SyntaxEditor.xcstrings */,
|
||||
2A39AC802B8CDFC800E216C9 /* EncodingList.xcstrings */,
|
||||
2A1E7E292B8D7414004F0C07 /* SyntaxMappingConflict.xcstrings */,
|
||||
2A1E7DE72B8D615A004F0C07 /* TextFind */,
|
||||
2AA672B32B8F9F1C00B8F7E6 /* Document.xcstrings */,
|
||||
2AA672A12B8F8AA300B8F7E6 /* DocumentWindow.xcstrings */,
|
||||
2A7FEF1D2B90C7050042BEFF /* Toolbar.xcstrings */,
|
||||
2AC94B212B6E26F40086F9F2 /* Inspector.xcstrings */,
|
||||
2A39AC942B8CE43100E216C9 /* AccessoryViews */,
|
||||
2AB9E4BB2B7F2378004E5BDC /* Settings */,
|
||||
2A1E7DE72B8D615A004F0C07 /* Text Finder */,
|
||||
2AA6731E2B917B6500B8F7E6 /* Document Window */,
|
||||
2A39AC942B8CE43100E216C9 /* Accessory Views */,
|
||||
2A7FEF352B90EBEA0042BEFF /* Panels */,
|
||||
2A7FEF0D2B90B1800042BEFF /* Views */,
|
||||
2AA6725B2B8F74D900B8F7E6 /* Models */,
|
||||
2AA2E0111BFE12620087BDD6 /* UnicodeBlock.strings */,
|
||||
2A5E6FC32A723CE900E33EA7 /* InfoPlist.xcstrings */,
|
||||
2A5E6FC62A723F3C00E33EA7 /* ServicesMenu.xcstrings */,
|
||||
2A36E3702AF9ED0B00A73534 /* Sparkle.xcstrings */,
|
||||
2AA2E0111BFE12620087BDD6 /* UnicodeBlock.strings */,
|
||||
);
|
||||
name = Localizables;
|
||||
sourceTree = "<group>";
|
||||
|
@ -8,7 +8,7 @@
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// © 2015-2023 1024jp
|
||||
// © 2015-2024 1024jp
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -63,7 +63,8 @@ final class UpdaterManager: NSObject, SPUUpdaterDelegate {
|
||||
}
|
||||
|
||||
let menuItem = NSMenuItem()
|
||||
menuItem.title = String(localized: "Check for Updates…", table: "Sparkle")
|
||||
menuItem.title = String(localized: "Check for Updates…", table: "Sparkle",
|
||||
comment: "a command provided only in the non-AppStore version")
|
||||
menuItem.action = #selector(SPUUpdater.checkForUpdates)
|
||||
menuItem.target = self.controller.updater
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user