Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit 7f5116e

Browse files
committedFeb 22, 2022
add: Localization
1 parent 6194114 commit 7f5116e

File tree

11 files changed

+117
-33
lines changed

11 files changed

+117
-33
lines changed
 

‎DevToys/DevToys.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@
10421042
CODE_SIGN_IDENTITY = "Apple Development";
10431043
CODE_SIGN_STYLE = Automatic;
10441044
COMBINE_HIDPI_IMAGES = YES;
1045-
CURRENT_PROJECT_VERSION = 1;
1045+
CURRENT_PROJECT_VERSION = 0.0.9;
10461046
DEVELOPMENT_TEAM = T5HMUWWK5R;
10471047
ENABLE_HARDENED_RUNTIME = YES;
10481048
INFOPLIST_FILE = DevToys/Info.plist;
@@ -1057,7 +1057,7 @@
10571057
"$(PROJECT_DIR)/DevToys/Body/Media/Image\\ Optimizer",
10581058
);
10591059
MACOSX_DEPLOYMENT_TARGET = 10.15;
1060-
MARKETING_VERSION = 0.0.8.4;
1060+
MARKETING_VERSION = 0.0.9;
10611061
PRODUCT_BUNDLE_IDENTIFIER = com.yuki.DevToys;
10621062
PRODUCT_NAME = "$(TARGET_NAME)";
10631063
SWIFT_ENFORCE_EXCLUSIVE_ACCESS = off;
@@ -1075,7 +1075,7 @@
10751075
CODE_SIGN_IDENTITY = "Apple Development";
10761076
CODE_SIGN_STYLE = Automatic;
10771077
COMBINE_HIDPI_IMAGES = YES;
1078-
CURRENT_PROJECT_VERSION = 1;
1078+
CURRENT_PROJECT_VERSION = 0.0.9;
10791079
DEVELOPMENT_TEAM = T5HMUWWK5R;
10801080
ENABLE_HARDENED_RUNTIME = YES;
10811081
INFOPLIST_FILE = DevToys/Info.plist;
@@ -1090,7 +1090,7 @@
10901090
"$(PROJECT_DIR)/DevToys/Body/Media/Image\\ Optimizer",
10911091
);
10921092
MACOSX_DEPLOYMENT_TARGET = 10.15;
1093-
MARKETING_VERSION = 0.0.8.4;
1093+
MARKETING_VERSION = 0.0.9;
10941094
PRODUCT_BUNDLE_IDENTIFIER = com.yuki.DevToys;
10951095
PRODUCT_NAME = "$(TARGET_NAME)";
10961096
SWIFT_ENFORCE_EXCLUSIVE_ACCESS = off;

‎DevToys/DevToys/Body/Graphic/Color Picker/ColorPickerView+.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ enum ColorPickerType: String, TextItem {
190190
case hsbCircle = "HSB Circle"
191191
case hsbCircleAndBars = "HSB Circle and Bars"
192192

193-
var title: String { rawValue }
193+
var title: String { rawValue.localized() }
194194
}
195195

196196
enum ColorCopyType: String, TextItem {
@@ -259,7 +259,7 @@ final private class ColorPickerView: Page {
259259
}
260260

261261
override func onAwake() {
262-
self.addSection(Area(icon: R.Image.settings, title: "Picker Type", control: pickerTypePicker))
262+
self.addSection(Area(icon: R.Image.settings, title: "Picker Type".localized(), control: pickerTypePicker))
263263
self.pickerPlaceholder.contentView = circleBarsHSBPicker
264264
self.addSection(pickerPlaceholder)
265265

@@ -272,12 +272,12 @@ final private class ColorPickerView: Page {
272272

273273
self.addSection(componentsStack)
274274

275-
self.addSection(Section(title: "Color Hex", orientation: .horizontal, fillWidth: false, items: [
275+
self.addSection(Section(title: "Color Hex".localized(), orientation: .horizontal, fillWidth: false, items: [
276276
hex3TextField, hex6TextField, hex8TextField
277277
]))
278278

279-
self.addSection(Section(title: "Color Copy", items: [
280-
Area(icon: R.Image.copy, title: "Type", control: colorCopyTypePicker),
279+
self.addSection(Section(title: "Color Copy".localized(), items: [
280+
Area(icon: R.Image.copy, title: "Color Copy Type".localized(), control: colorCopyTypePicker),
281281
self.colorCopyPlaceholder
282282
]))
283283

‎DevToys/DevToys/Body/Graphic/Movie to Gif/GifConverterView+.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ final private class GifConverterView: Page {
9292
self.registerForDraggedTypes([.fileURL])
9393

9494
self.addSection(Section(title: "Configuration".localized(), items: [
95-
Area(icon: R.Image.spacing, title: "Width".localized(), message: "The width of the Gif file (height will be determined)".localized(), control: widthField),
95+
Area(icon: R.Image.spacing, title: "Width".localized(), message: "The width of the Gif file".localized(), control: widthField),
9696
Area(icon: R.Image.paramators, title: "FPS".localized(), message: "FPS of the Gif file to be exported".localized(), control: fpsField),
9797
Area(icon: R.Image.paramators, title: "Remove source file".localized(), message: "Whether to delete the source file after exporting a Gif".localized(), control: removeFileSwitch)
9898
]))
@@ -179,7 +179,7 @@ extension GifConvertListView: NSTableViewDataSource, NSTableViewDelegate {
179179
let task = convertTasks[row]
180180

181181
cell.titleLabel.stringValue = task.title
182-
cell.infoLabel.stringValue = "Starting..."
182+
cell.infoLabel.stringValue = "Starting...".localized()
183183
cell.thumbnailImageView.image = task.thumbnail
184184

185185
task.fftask
@@ -197,10 +197,10 @@ extension GifConvertListView: NSTableViewDataSource, NSTableViewDelegate {
197197
task.complete
198198
.receive(on: .main)
199199
.sink({
200-
cell.infoLabel.stringValue = "Complete"
200+
cell.infoLabel.stringValue = "Complete".localized()
201201
}, { error in
202202
cell.infoLabel.textColor = .systemRed
203-
cell.infoLabel.stringValue = "Convert Failed \(error)"
203+
cell.infoLabel.stringValue = "Convert Failed".localized()
204204
})
205205
}
206206

‎DevToys/DevToys/Body/Media/Audio Converter/AudioConverterView+.swift

+3-4
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ extension AudioConvertListView: NSTableViewDataSource, NSTableViewDelegate {
198198
let task = convertTasks[row]
199199

200200
cell.titleLabel.stringValue = task.title
201-
cell.infoLabel.stringValue = "Starting..."
202-
// cell.thumbnailImageView.image = task.thumbnail
201+
cell.infoLabel.stringValue = "Starting...".localized()
203202

204203
task.fftask
205204
.receive(on: .main)
@@ -216,10 +215,10 @@ extension AudioConvertListView: NSTableViewDataSource, NSTableViewDelegate {
216215
task.complete
217216
.receive(on: .main)
218217
.sink({
219-
cell.infoLabel.stringValue = "Complete"
218+
cell.infoLabel.stringValue = "Complete".localized()
220219
}, { error in
221220
cell.infoLabel.textColor = .systemRed
222-
cell.infoLabel.stringValue = "Convert Failed \(error)"
221+
cell.infoLabel.stringValue = "Convert Failed".localized()
223222
})
224223
}
225224

‎DevToys/DevToys/Body/SettingView+.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class SettingViewController: NSViewController {
2424
extension Settings.AppearanceType: TextItem {
2525
static let allCases: [Self] = [.useSystemSettings, .lightMode, .darkMode]
2626

27-
var title: String { rawValue }
27+
var title: String { rawValue.localized() }
2828
}
2929

3030
final private class SettingView: Page {
@@ -33,7 +33,7 @@ final private class SettingView: Page {
3333

3434
override func onAwake() {
3535
self.addSection(
36-
Area(icon: R.Image.paramators, title: "App Theme", message: "Select which app theme to display", control: appearancePicker)
36+
Area(icon: R.Image.paramators, title: "App Theme".localized(), message: "Select which app theme to display".localized(), control: appearancePicker)
3737
)
3838
}
3939
}

‎DevToys/DevToys/Info.plist

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
<string>$(PRODUCT_NAME)</string>
1919
<key>CFBundlePackageType</key>
2020
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
21-
<key>CFBundleShortVersionString</key>
22-
<string>$(MARKETING_VERSION)</string>
2321
<key>CFBundleVersion</key>
24-
<string>0.0.8.4</string>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
2523
<key>LSApplicationCategoryType</key>
2624
<string>public.app-category.developer-tools</string>
2725
<key>LSMinimumSystemVersion</key>

‎DevToys/DevToys/Model/Tool+Default.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ extension Tool {
1919
viewController: SearchViewController()
2020
)
2121
static let settings = Tool(
22-
title: "Settings", identifier: "settings", category: .settings, icon: R.Image.Tool.settings,
23-
toolDescription: "Setting of application", showAlways: true, showOnHome: true, showOnSidebar: false,
22+
title: "Settings".localized(), identifier: "settings", category: .settings, icon: R.Image.Tool.settings,
23+
toolDescription: "Setting of application".localized(), showAlways: true, showOnHome: true, showOnSidebar: false,
2424
viewController: SettingViewController()
2525
)
2626

@@ -131,20 +131,20 @@ extension Tool {
131131
viewController: ImageConverterViewController()
132132
)
133133
static let colorPicker = Tool(
134-
title: "Color Picker", identifier: "colorpicker", category: .graphic, icon: R.Image.Tool.colorPicker,
135-
sidebarTitle: "Color Picker", toolDescription: "Picker the color and copy components",
134+
title: "Color Picker".localized(), identifier: "colorpicker", category: .graphic, icon: R.Image.Tool.colorPicker,
135+
sidebarTitle: "Color Picker".localized(), toolDescription: "Picker the color and copy components".localized(),
136136
viewController: ColorPickerViewController()
137137
)
138138
static let gifConverter = Tool(
139-
title: "Gif Converter", identifier: "gifconverter", category: .graphic, icon: R.Image.Tool.gif,
140-
sidebarTitle: "Gif Converter", toolDescription: "Convert movie to animation gif file",
139+
title: "Gif Converter".localized(), identifier: "gifconverter", category: .graphic, icon: R.Image.Tool.gif,
140+
sidebarTitle: "Gif Converter".localized(), toolDescription: "Convert a movie to an animated GIF file".localized(),
141141
viewController: GifConverterViewController()
142142
)
143143

144144
// MARK: - Media -
145145
static let audioConverter = Tool(
146-
title: "Audio Converter", identifier: "audioconverter", category: .media, icon: R.Image.Tool.audioConverter,
147-
sidebarTitle: "Audio Converter", toolDescription: "Convert audio from one format to another",
146+
title: "Audio Converter".localized(), identifier: "audioconverter", category: .media, icon: R.Image.Tool.audioConverter,
147+
sidebarTitle: "Audio Converter".localized(), toolDescription: "Convert audio from one format to another".localized(),
148148
viewController: AudioConverterViewController()
149149
)
150150
}

‎DevToys/DevToys/Model/ToolCategory+Default.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ extension ToolCategory {
1414
static let text = ToolCategory(name: "category.text".localized(), icon: R.Image.Tool.text, identifier: "text")
1515
static let graphic = ToolCategory(name: "category.graphic".localized(), icon: R.Image.Tool.graphic, identifier: "graphic")
1616
static let media = ToolCategory(name: "Media".localized(), icon: R.Image.Tool.media, identifier: "media")
17-
static let settings = ToolCategory(name: "Settings", icon: nil, identifier: "settings", shouldHideCategory: true)
17+
static let settings = ToolCategory(name: "Settings".localized(), icon: nil, identifier: "settings", shouldHideCategory: true)
1818
}

‎DevToys/DevToys/Resource/en.lproj/Localizable.strings

+38
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"Information" = "Information";
3636
"Clear" = "Clear";
3737
"Delete" = "Delete";
38+
"Open in Finder" = "Open in Finder";
39+
"Quick Look" = "Quick Look";
3840

3941
// - Category -
4042
"category.home" = "Home";
@@ -44,6 +46,7 @@
4446
"category.generators" = "Generators";
4547
"category.text" = "Text";
4648
"category.graphic" = "Graphic";
49+
"Media" = "Media";
4750

4851
// - Tool -
4952
"tool.home.title" = "Home";
@@ -188,3 +191,38 @@
188191
"Converted Images" = "Converted Images";
189192
"Scale" = "Scale";
190193
"Size" = "Size";
194+
195+
"Settings" = "Settings";
196+
"Setting of application" = "Setting of application";
197+
"App Theme" = "App Theme";
198+
"Select which app theme to display" = "Select which app theme to display";
199+
"Use system setting" = "Use system setting";
200+
"Light mode" = "Light mode";
201+
"Dark mode" = "Dark mode";
202+
203+
"Color Picker" = "Color Picker";
204+
"Picker the color and copy components" = "Pick a color and copy the formatted color";
205+
"HSB Box" = "HSB Box";
206+
"HSB Circle" = "HSB Circle";
207+
"HSB Circle and Bars" = "HSB Circle and Bars";
208+
"Pick Color" = "Pick Color";
209+
"Picker Type" = "Picker Type";
210+
"Color Hex" = "Color Hex";
211+
"Color Copy" = "Color Copy";
212+
"Color Copy Type" = "Type";
213+
214+
"Gif Converter" = "Gif Converter";
215+
"Convert a movie to an animated GIF file" = "Convert a movie to an animated GIF file";
216+
"Width" = "Width";
217+
"The width of the Gif file" = "The width of the Gif file (height will be determined)";
218+
"FPS" = "FPS";
219+
"FPS of the Gif file to be exported" = "FPS of the Gif file to be exported";
220+
"Remove source file" = "Remove source file";
221+
"Whether to delete the source file after exporting a Gif" = "Whether to delete the source file after exporting a Gif";
222+
223+
"Audio Converter" = "Audio Converter";
224+
"Convert audio from one format to another" = "Convert audio from one format to another";
225+
"Whether to delete the source file after exporting a Audio" = "Whether to delete the source file after exporting a Audio";
226+
"Starting..." = "Starting...";
227+
"Complete" = "Complete";
228+
"Convert Failed" = "Convert Failed";

‎DevToys/DevToys/Resource/ja.lproj/Localizable.strings

+39-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"Bytes" = "バイト数";
4040
"Clear" = "クリア";
4141
"Delete" = "削除";
42+
"Open in Finder" = "Finderで開く";
43+
"Quick Look" = "クイックルック";
4244

4345
// - Category -
4446
"category.home" = "ホーム";
@@ -47,7 +49,8 @@
4749
"category.formatters" = "フォーマット";
4850
"category.generators" = "生成";
4951
"category.text" = "テキスト";
50-
"category.graphic" = "メディア";
52+
"category.graphic" = "画像";
53+
"Media" = "メディア";
5154

5255
// - Tool -
5356
"tool.home.title" = "ホーム";
@@ -184,3 +187,38 @@
184187
"Converted Images" = "変換した画像";
185188
"Scale" = "大きさの変換";
186189
"Size" = "サイズ";
190+
191+
"Settings" = "設定";
192+
"Setting of application" = "アプリの設定を行います";
193+
"App Theme" = "アプリのテーマ";
194+
"Select which app theme to display" = "表示に用いるテーマの選択";
195+
"Use system setting" = "自動";
196+
"Light mode" = "ライト";
197+
"Dark mode" = "ダーク";
198+
199+
"Color Picker" = "カラーピッカー";
200+
"Picker the color and copy components" = "色を選択してフォーマットした文字列をコピーします";
201+
"HSB Box" = "HSBボックス";
202+
"HSB Circle" = "HSBサークル";
203+
"HSB Circle and Bars" = "HSB バー&サークル";
204+
"Pick Color" = "色を選択";
205+
"Picker Type" = "選択のタイプ";
206+
"Color Hex" = "Hex値";
207+
"Color Copy" = "色をコピー";
208+
"Color Copy Type" = "型";
209+
210+
"Gif Converter" = "Gifへの変換";
211+
"Convert a movie to an animated GIF file" = "動画をアニメーションGifに変換します";
212+
"Width" = "幅";
213+
"The width of the Gif file" = "Gifファイルの横幅 (高さは自動決定されます)";
214+
"FPS" = "FPS";
215+
"FPS of the Gif file to be exported" = "書き出すGifファイルのFPS";
216+
"Remove source file" = "元ファイルを削除";
217+
"Whether to delete the source file after exporting a Gif" = "Gifファイル書き出し後に元ファイルを削除するか";
218+
219+
"Audio Converter" = "音声フォーマット変換";
220+
"Convert audio from one format to another" = "音声ファイルのフォーマット・音質の変更を行います";
221+
"Whether to delete the source file after exporting a Audio" = "ファイル書き出し後に元ファイルを削除するか";
222+
"Starting..." = "初期化中...";
223+
"Complete" = "完了";
224+
"Convert Failed" = "変換失敗";

‎Release Checklist.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
# Checklist for release
1+
# Release Checklist
22

33
This is the procedure for doing a release.
44

55

66

77
1. Update the project version from Xcode's project pane
8+
9+
Update both Version and Build (Sparkle seems to be referring to the build.)
10+
811
2. Archive and Notarize app
912
- With Distribute App > Developer ID
13+
1014
3. Create a tag for the release and push that tag.
15+
1116
4. Create a Github release page.
17+
1218
5. Create a zip file of the nolarized app on **local** (not the github page) and upload it to Asset.
1319
- The checksum of the zip file will be requested by appcast.
20+
1421
6. Generate appcast file with `generate_appcast` command.
22+
1523
7. Publish release on GitHub.
24+
1625
8. Update generated `appcast.xml` 's `<enclosure url="...">` to release asset URL.
26+
1727
9. Add new `appcast.xml` to git and push.
28+
1829
10. If needed, create `release-note.html` for Sparkle update.

0 commit comments

Comments
 (0)
This repository has been archived.