Improve localization comments

This commit is contained in:
1024jp 2023-08-01 12:40:20 +09:00
parent 1495590eab
commit 6562b9d4a7
25 changed files with 73 additions and 53 deletions

View File

@ -36,6 +36,8 @@ 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 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.
If your localization makes the Autolayout 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 storyboard file to layout your localized terms correctly.
@ -53,11 +55,10 @@ Especially, follow the terms of the following applications.
We recommend to utilize [Apple Localization Terms Glossary for macOS](https://applelocalization.com/macos) by Kishikawa Katsumi to find macOS-friendly expressions. This service enables us to search in the texts localized by Apple for macOS applications and frameworks.
You also need to take care of how Apple treats punctuation characters and symbols. For example, regarding quotation marks, they normally prefer the typographer's ones.
#### Submitting 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.
Note that you don't need to localize the Unicode block names in the `UnicodeUnicode.strings` file.
Note that you don't need to localize the Unicode block names in the `UnicodeBlock.strings` file.
Continuous maintenance of the localization is highly recommended when providing a new localization. Please tell us if you also intend to be a localization maintainer when submitting a new localization. When we have new strings to be localized, we call the localization maintainers by creating an issue with the `@` mention on GitHub so that they can keep all their localized strings up to date.
Currently, we already have maintainers for:
@ -98,6 +99,7 @@ We don't accept pull requests adding bundled themes at the moment. You can distr
We don't accept pull requests for image resources. [1024jp](https://github.com/1024jp) enjoys creating and brushing up the graphics ;). Please just point out on the Issues page if a graphic resource has some kind of mistake to be fixed.
Coding Style Guide
--------------------------

View File

@ -1014,7 +1014,8 @@ final class Document: NSDocument, AdditionalDocumentPreparing, EncodingHolder {
if self.isDocumentEdited {
let alert = NSAlert()
alert.messageText = String(localized: "The document has unsaved changes.")
alert.informativeText = String(localized: "Do you want to discard the changes and reopen the document using “\(fileEncoding.localizedName)”?")
alert.informativeText = String(localized: "Do you want to discard the changes and reopen the document using “\(fileEncoding.localizedName)”?",
comment: "%@ is an encoding name")
alert.addButton(withTitle: String(localized: "Cancel"))
alert.addButton(withTitle: String(localized: "Discard Changes"))
alert.buttons.last?.hasDestructiveAction = true

View File

@ -299,7 +299,8 @@ final class DocumentViewController: NSSplitViewController, ThemeHolder, NSToolba
let canActivateShowInvisibles = !UserDefaults.standard.showsInvisible.isEmpty
item.toolTip = canActivateShowInvisibles
? nil
: String(localized: "To show invisible characters, set them in Settings")
: String(localized: "To show invisible characters, set them in the Appearance settings",
comment: "Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled")
if canActivateShowInvisibles {
(item as? NSToolbarItem)?.toolTip = self.showsInvisibles
? String(localized: "Hide invisible characters")

View File

@ -50,7 +50,8 @@ final class DocumentWindowController: NSWindowController, NSWindowDelegate {
let dotView = DotView()
dotView.color = .tertiaryLabelColor
dotView.toolTip = String(localized: "Document has unsaved changes")
dotView.toolTip = String(localized: "Document has unsaved changes",
comment: "tooltip for the “edited” indicator in the window tab")
dotView.setContentHuggingPriority(.defaultHigh, for: .horizontal)
return dotView
}()

View File

@ -37,7 +37,7 @@ struct FileEncoding: Equatable {
let localizedName = String.localizedName(of: self.encoding)
return (self.encoding == .utf8 && self.withUTF8BOM)
? String(localized: "\(localizedName) with BOM", comment: "Unicode (UTF-8) with BOM")
? String(localized: "\(localizedName) with BOM", comment: "Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)")
: localizedName
}
}

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "Zeilen nicht umbrechen";
"Wrap Lines" = "Zeilen umbrechen";
// Tooltip for "Show Invisibles" menu item and toolbar item
"To show invisible characters, set them in Settings" = "Um Steuerzeichen anzuzeigen, setze sie in den Einstellungen";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "Um Steuerzeichen anzuzeigen, setze sie in den Einstellungen „Asssehen“";
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ mit BOM";

View File

@ -24,7 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Keilschrift";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "Unwrap Lines";
"Wrap Lines" = "Wrap Lines";
// Tooltip for "Show Invisibles" menu item
"To show invisible characters, set them in Settings" = "To show invisible characters, set them in Settings";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "To show invisible characters, set them in the Appearance settings";
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ with BOM";

View File

@ -24,8 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// release date of the used grossary: 2020-01-15
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Cuneiform";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "No ajustar líneas";
"Wrap Lines" = "Ajustar líneas";
// Tooltip for "Show Invisibles" menu item
"To show invisible characters, set them in Settings" = "Para mostrar caracteres invisibles, configúralos en ajustes";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "Para mostrar caracteres invisibles, configúralos en ajustes"; // FIXME: Setting -> the Appearance Settings
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ con BOM";

View File

@ -24,8 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// release date of the used grossary: 2020-01-15
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Cuneiforme";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "Ne pas renvoyer à la ligne";
"Wrap Lines" = "Renvoyer à la ligne";
// Tooltip for "Show Invisibles" menu item and toolbar item
"To show invisible characters, set them in Settings" = "Pour afficher les caractères invisibles, activez loption dans les Réglages";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "Pour afficher les caractères invisibles, activez loption dans les Réglages"; // FIXME: Setting -> the Appearance Settings
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ avec BOM";

View File

@ -24,7 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Cunéiforme";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "Rimuovi a capo automatico";
"Wrap Lines" = "A capo automatico";
// Tooltip for "Show Invisibles" menu item and toolbar item
"To show invisible characters, set them in Settings" = "Per visualizzare i caratteri invisibili, impostarli nelle Impostazioni";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "Per visualizzare i caratteri invisibili, impostarli nelle Impostazioni"; // FIXME: Setting -> the Appearance Settings
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ con BOM";

View File

@ -24,8 +24,9 @@
// limitations under the License.
//
// Unicode block names
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Cuneiforme";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "行を折り返さない";
"Wrap Lines" = "行を折り返す";
// Tooltip for "Show Invisibles" menu item
"To show invisible characters, set them in Settings" = "不可視文字を表示させるには設定を変更してください";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "不可視文字を表示させるには「表示」設定で設定を変更してください";
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@BOM付き";

View File

@ -24,8 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// release date of the used grossary: 2020-01-15
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "楔形文字";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "Desajustar Linhas";
"Wrap Lines" = "Ajustar Linhas";
// Tooltip for "Show Invisibles" menu item and toolbar item
"To show invisible characters, set them in Settings" = "Para mostrar invisíveis, ative-os nas Definições";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "Para mostrar invisíveis, ative-os nas Definições"; // FIXME: Setting -> the Appearance Settings
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ com BOM";

View File

@ -24,7 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Cuneiforme";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "Satırları Kaydırma";
"Wrap Lines" = "Satırları Kaydır";
// Tooltip for "Show Invisibles" menu item
"To show invisible characters, set them in Settings" = "Görünmez karakterleri göstermek için ilgili ayarı Ayarlardan değiştirin";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "Görünmez karakterleri göstermek için ilgili ayarı Ayarlardan değiştirin"; // FIXME: Setting -> the Appearance Settings
@ -840,7 +840,7 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "BOM ile %@";

View File

@ -24,8 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// release date of the used grossary: 2020-01-15
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "Çivi Yazısı";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "不换行";
"Wrap Lines" = "换行";
// Tooltip for "Show Invisibles" menu item and toolbar item
"To show invisible characters, set them in Settings" = "要显示不可见元素,请在设置中进行设定";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "要显示不可见元素,请在设置中进行设定"; // FIXME: Setting -> the Appearance Settings
@ -840,8 +840,8 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
"%@ with BOM" = "%@ with BOM"; // No need to be tranlated because "UTF-8 with BOM" is acceptable in zh-Hans.
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ with BOM"; // No need to be translated because "UTF-8 with BOM" is acceptable in zh-Hans.

View File

@ -24,7 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "楔形文字";

View File

@ -529,8 +529,8 @@
"Unwrap Lines" = "不換行";
"Wrap Lines" = "換行";
// Tooltip for "Show Invisibles" menu item and toolbar item
"To show invisible characters, set them in Settings" = "要顯示不可見元素,請在設定中進行設定";
// Tooltip for “Show Invisibles” menu item and toolbar item for when all invisible settings are disabled
"To show invisible characters, set them in the Appearance settings" = "要顯示不可見元素,請在設定中進行設定"; // FIXME: Setting -> the Appearance Settings
@ -840,8 +840,8 @@
/* MARK: String extension */
// Encoding name for UTF-8 with BOM (`%@` is the system localized name for UTF-8)
"%@ with BOM" = "%@ with BOM"; // No need to be tranlated because "UTF-8 with BOM" is acceptable in zh-Hans.
// Encoding name for UTF-8 with BOM (%@ is the system localized name for UTF-8)
"%@ with BOM" = "%@ with BOM"; // No need to be translated because "UTF-8 with BOM" is acceptable in zh-Hans.

View File

@ -24,7 +24,9 @@
// limitations under the License.
//
// -> auto-generated from CharacterPaletteIM.lg in Apple's glossaries
// -> You don't need to translate the terms in this file
// since they are auto-generated from CharacterPaletteIM.lg in the Apple's glossaries.
// release date of the used glossary: 2020-01-15
// cf. <https://developer.apple.com/download/all/?q=glossaries>
"Cuneiform" = "楔形文字";