Skip to content

Commit

Permalink
Migrate some .strings to .xcstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Aug 13, 2023
1 parent 9ad010e commit 610d75d
Show file tree
Hide file tree
Showing 73 changed files with 18,782 additions and 7,583 deletions.
122 changes: 22 additions & 100 deletions CotEditor.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CotEditor/Base.lproj/InconsistentLineEndingsView.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="psz-YY-ahv">
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" id="psz-YY-ahv">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -89,7 +89,7 @@
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="nvM-Mq-maK">
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" id="nvM-Mq-maK">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down
13 changes: 11 additions & 2 deletions CotEditor/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22152" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22152"/>
</dependencies>
<scenes>
<!--Application-->
Expand Down Expand Up @@ -740,18 +740,27 @@ DQ
</connections>
</menuItem>
<menuItem title="Parentheses" keyEquivalent="(" localization="NO" mirroring="NO" id="G3o-1h-GwR">
<attributedString key="userComments">
<fragment content="()"/>
</attributedString>
<connections>
<action selector="surroundSelectionWithParentheses:" target="Ady-hI-5gd" id="gvU-WD-OLA"/>
</connections>
</menuItem>
<menuItem title="Braces" id="Xoq-43-C1z">
<modifierMask key="keyEquivalentModifierMask"/>
<attributedString key="userComments">
<fragment content="{}"/>
</attributedString>
<connections>
<action selector="surroundSelectionWithBraces:" target="Ady-hI-5gd" id="LTH-8s-duP"/>
</connections>
</menuItem>
<menuItem title="Brackets" id="cTU-2P-7Tp">
<modifierMask key="keyEquivalentModifierMask"/>
<attributedString key="userComments">
<fragment content="[]"/>
</attributedString>
<connections>
<action selector="surroundSelectionWithSquareBrackets:" target="Ady-hI-5gd" id="92J-nd-Mh7"/>
</connections>
Expand Down
7 changes: 3 additions & 4 deletions CotEditor/Base.lproj/OutlineView.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="rwF-t2-tPJ">
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" id="rwF-t2-tPJ">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -117,12 +117,11 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="Wry-M9-Gep" name="hidden" keyPath="filteringMessage" id="K9S-uP-gXF">
<binding destination="Wry-M9-Gep" name="hidden" keyPath="hasFilteredItems" id="SK6-Gx-dYy">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
<binding destination="Wry-M9-Gep" name="value" keyPath="filteringMessage" id="gCy-hm-15H"/>
</connections>
</textField>
</subviews>
Expand Down
11 changes: 3 additions & 8 deletions CotEditor/Base.lproj/StatusBar.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="NBJ-8W-V9X">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22152" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="NBJ-8W-V9X">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22152"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -44,19 +44,14 @@
</popUpButton>
<popUpButton toolTip="File Encoding" translatesAutoresizingMaskIntoConstraints="NO" id="CUv-So-9Og">
<rect key="frame" x="378" y="0.0" width="133" height="21"/>
<popUpButtonCell key="cell" type="smallSquare" title="Unicode (UTF-8)" bezelStyle="smallSquare" imagePosition="left" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" inset="2" autoenablesItems="NO" selectedItem="fc5-iy-HpH" id="2gs-WJ-6IP">
<popUpButtonCell key="cell" type="smallSquare" title="File Encoding" bezelStyle="smallSquare" imagePosition="left" alignment="left" controlSize="small" lineBreakMode="truncatingTail" tag="-1" inset="2" autoenablesItems="NO" selectedItem="q4F-Uw-VL4" id="2gs-WJ-6IP">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<menu key="menu" autoenablesItems="NO" id="E76-Et-IKc">
<items>
<menuItem title="File Encoding" tag="-1" enabled="NO" id="q4F-Uw-VL4" customClass="HeadingMenuItem" customModule="CotEditor" customModuleProvider="target">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="Unicode (UTF-8)" state="on" id="fc5-iy-HpH">
<connections>
<action selector="changeEncoding:" target="wKh-dn-8NK" id="1lD-Lq-887"/>
</connections>
</menuItem>
</items>
</menu>
</popUpButtonCell>
Expand Down
70 changes: 70 additions & 0 deletions CotEditor/CotEditor/mul.lproj/Sparkle.xcstrings
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"sourceLanguage" : "en",
"strings" : {
"Check for Updates…" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nach Updates suchen …"
}
},
"en-GB" : {
"stringUnit" : {
"state" : "translated",
"value" : "Check for Updates…"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Comprueba si hay actualizaciones…"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vérifier les mises à jour…"
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "Controlla aggiornamenti…"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "アップデートを確認…"
}
},
"pt" : {
"stringUnit" : {
"state" : "translated",
"value" : "Buscar Atualizações…"
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Güncellemeleri Denetle…"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "检查更新…"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "檢查更新…"
}
}
}
}
},
"version" : "1.0"
}
6 changes: 2 additions & 4 deletions CotEditor/Sources/OutlineViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ final class OutlineViewController: NSViewController {
}

private var filteredOutlineItems: [OutlineItem] = [] { didSet { self.outlineView?.reloadData() } }
@objc dynamic var filteringMessage: String?
@objc dynamic var hasFilteredItems = false

private var documentObserver: AnyCancellable?
private var syntaxObserver: AnyCancellable?
Expand Down Expand Up @@ -237,9 +237,7 @@ final class OutlineViewController: NSViewController {
private func filterItems(with searchString: String) {

self.filteredOutlineItems = self.outlineItems.filterItems(with: searchString)
self.filteringMessage = (!searchString.isEmpty && self.filteredOutlineItems.isEmpty)
? String(localized: "No Filter Results")
: nil
self.hasFilteredItems = (!searchString.isEmpty && self.filteredOutlineItems.isEmpty)
}
}

Expand Down
2 changes: 1 addition & 1 deletion CotEditor/Sources/UpdaterManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ final class UpdaterManager: NSObject, SPUUpdaterDelegate {
}

let menuItem = NSMenuItem()
menuItem.title = String(localized: "Check for Updates…")
menuItem.title = String(localized: "Check for Updates…", table: "Sparkle")
menuItem.action = #selector(SPUUpdater.checkForUpdates)
menuItem.target = self.controller.updater

Expand Down
33 changes: 0 additions & 33 deletions CotEditor/de.lproj/InconsistentLineEndingsView.strings

This file was deleted.

5 changes: 0 additions & 5 deletions CotEditor/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
"Find Result" = "Suchergebnis";


// Main menu item titles
"Check for Updates…" = "Nach Updates suchen …";


// warning message occurs in multiple places
"Are you sure you want to delete “%@”?" = "Möchtest du „%@“ wirklich löschen?";
"This action cannot be undone." = "Diese Aktion kann nicht widerrufen werden.";
Expand Down Expand Up @@ -464,7 +460,6 @@
"Recent Filters" = "Zuletzt gefiltert";
"Clear Recent Filters" = "Letzte Filter löschen";
"No Recent Filter" = "Keine letzten Filtereinträge";
"No Filter Results" = "Keine Filtertreffer";

// Warnings
"No issues found." = "Keine Probleme gefunden.";
Expand Down
Loading

0 comments on commit 610d75d

Please sign in to comment.