Skip to content

Commit 6afa732

Browse files
committed
Add list of translation strings and fix several small bugs
1 parent c14a46f commit 6afa732

8 files changed

+296
-22
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ packages/
1313
Package.StoreAssociation.xml
1414
_pkginfo.txt
1515
images.zip
16-
messages.pot
1716
settings.conf

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ After you have chosen a theme and entered your location, the app will minimize t
1919

2020
## Frequently Asked Questions
2121

22-
### Why did I develop this?
22+
### Why did you develop this?
2323

2424
When the Dynamic Desktop feature was announced for macOS Mojave which shifts through 16 images of the same desert scene taken at different times of day, I wanted to make a Windows program that would do the same thing. Windows 10 natively supports cycling through multiple wallpapers, but not based on the times of sunrise and sunset. WinDynamicDesktop adds that feature to the Windows desktop.
2525

@@ -31,14 +31,18 @@ There is an option to enable this in the "More Options" section of the system tr
3131

3232
This is a commonly requested feature to mimic the behavior of macOS and many Linux distros where the lockscreen image is the same as the desktop wallpaper. If you are using the Microsoft Store version of WinDynamicDesktop, you can enable changing the lockscreen image as an experimental feature by editing the `settings.conf` file which is in the same folder as the EXE. Change the setting `"changeLockScreen":false` to `"changeLockScreen":true` (or add it if it doesn't exist), and make sure in the Windows 10 settings app that *Personalization* -> *Lock screen* -> *Background* is set to *Picture*. In order for this to work reliably on Windows, it would be ideal if Microsoft added an option in a future version of Windows to make the lockscreen image mirror the desktop wallpaper.
3333

34-
### How can you customize the images?
34+
### How can I customize the images?
3535

3636
You are not limited to the Mojave themes that come preinstalled with the app. Custom themes created by the community can be downloaded [here](https://github.com/t1m0thyj/WinDynamicDesktop/wiki/Community-created-themes). You can also create your own theme that uses whatever wallpaper images you want, by following the instructions in [this tutorial](https://github.com/t1m0thyj/WinDynamicDesktop/wiki/Creating-custom-themes).
3737

38-
### How can you hide the tray icon?
38+
### How can I hide the tray icon?
3939

4040
If you want to run the app silently with no icon in the system tray, you can do this by editing the `settings.conf` file which is in the same folder as the EXE. Change the setting `"hideTrayIcon":false` to `"hideTrayIcon":true` (or add it if it doesn't exist), then restart the app.
4141

42+
### How can I change the folder where config files are stored?
43+
44+
If you want the app to store its settings and theme files in a different folder from the default, you can create a file `WinDynamicDesktop.pth` in the same folder as the EXE. Edit the file and add the config path you want to use on the first line.
45+
4246
## Legal and Privacy Stuff
4347
I do not own the wallpaper images used by WinDynamicDesktop, they belong to Apple. The icon used in this program was made by [Roundicons](https://www.flaticon.com/authors/roundicons) from [flaticon.com](https://www.flaticon.com/) and is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/).
4448

i18n/gettext.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import time
44
from collections import OrderedDict
55

6-
exclude_patterns = [r'WinDynamicDesktop$', r'\w+://', r'label\d+$', r'\W+$']
6+
app_name = "WinDynamicDesktop"
7+
exclude_patterns = [app_name + r'$', r'\w+://', r'label\d+$', r'\W+$']
78
pot_data = OrderedDict()
89

910

@@ -54,14 +55,14 @@ def add_to_pot_data(msgid, filename, lineno):
5455
"#",
5556
"msgid \"\"",
5657
"msgstr \"\"",
57-
"\"Project-Id-Version: PACKAGE VERSION\\n\"",
58+
"\"Project-Id-Version: {}\\n\"".format(app_name),
5859
"\"POT-Creation-Date: {}\\n\"".format(time.strftime("%Y-%m-%d %H:%M%z")),
5960
"\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"",
6061
"\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"",
6162
"\"Language-Team: LANGUAGE <LL@li.org>\\n\"",
6263
"\"MIME-Version: 1.0\\n\"",
63-
"\"Content-Type: text/plain; charset=CHARSET\\n\"",
64-
"\"Content-Transfer-Encoding: ENCODING\\n\""
64+
"\"Content-Type: text/plain; charset=UTF-8\\n\"",
65+
"\"Content-Transfer-Encoding: 8bit\\n\""
6566
]
6667

6768
for msgid, locs in pot_data.items():

i18n/messages.pot

+273
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
# SOME DESCRIPTIVE TITLE
2+
# Copyright (C) YEAR ORGANIZATION
3+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: WinDynamicDesktop\n"
8+
"POT-Creation-Date: 2019-03-05 09:10-0500\n"
9+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
11+
"Language-Team: LANGUAGE <LL@li.org>\n"
12+
"MIME-Version: 1.0\n"
13+
"Content-Type: text/plain; charset=UTF-8\n"
14+
"Content-Transfer-Encoding: 8bit\n"
15+
16+
#: src\AboutDialog.cs:58
17+
msgid "Thanks to:"
18+
msgstr ""
19+
20+
#: src\AboutDialog.cs:60
21+
msgid "Apple for the Mojave wallpapers"
22+
msgstr ""
23+
24+
#: src\AboutDialog.cs:61
25+
msgid "Contributors on GitHub"
26+
msgstr ""
27+
28+
#: src\AboutDialog.cs:62
29+
msgid "LocationIQ for their free geocoding API"
30+
msgstr ""
31+
32+
#: src\AboutDialog.cs:63
33+
msgid "Roundicons from flaticon.com for the icon (licensed by CC 3.0 BY)"
34+
msgstr ""
35+
36+
#: src\AboutDialog.Designer.cs:67
37+
msgid "Copyright © 2019 Timothy Johnson"
38+
msgstr ""
39+
40+
#: src\AboutDialog.Designer.cs:76
41+
msgid "Port of macOS Mojave Dynamic Desktop feature to Windows 10"
42+
msgstr ""
43+
44+
#: src\AboutDialog.Designer.cs:97 src\ThemeDialog.Designer.cs:170
45+
msgid "Close"
46+
msgstr ""
47+
48+
#: src\AboutDialog.Designer.cs:108
49+
msgid "Credits"
50+
msgstr ""
51+
52+
#: src\AboutDialog.Designer.cs:119
53+
msgid "Donate"
54+
msgstr ""
55+
56+
#: src\AboutDialog.Designer.cs:154
57+
msgid "About WinDynamicDesktop"
58+
msgstr ""
59+
60+
#: src\AppContext.cs:67
61+
msgid "Another instance of WinDynamicDesktop is already running. You can access it by clicking on the icon in the system tray."
62+
msgstr ""
63+
64+
#: src\AppContext.cs:69 src\InputDialog.cs:115 src\InputDialog.cs:135 src\ThemeDialog.cs:248 src\ThemeManager.cs:145 src\ThemeManager.cs:252 src\ThemeManager.cs:298 src\UpdateChecker.cs:100
65+
msgid "Error"
66+
msgstr ""
67+
68+
#: src\AppContext.cs:111
69+
msgid "The app is still running in the background. You can access it at any time by clicking on the icon in the system tray."
70+
msgstr ""
71+
72+
#: src\InputDialog.cs:93
73+
msgid ""
74+
"Is this location correct?\n"
75+
"\n"
76+
"{0}\n"
77+
"Sunrise: {1}, Sunset: {2}"
78+
msgstr ""
79+
80+
#: src\InputDialog.cs:96 src\InputDialog.cs:154 src\ThemeDialog.cs:446 src\ThemeDialog.cs:474 src\ThemeManager.cs:96
81+
msgid "Question"
82+
msgstr ""
83+
84+
#: src\InputDialog.cs:112
85+
msgid "The location you entered was invalid, or you are not connected to the Internet. Check your Internet connection and try a different location. You can use a complete address or just the name of your city/region."
86+
msgstr ""
87+
88+
#: src\InputDialog.cs:134
89+
msgid "Failed to get location from Windows location service."
90+
msgstr ""
91+
92+
#: src\InputDialog.cs:151
93+
msgid "WinDynamicDesktop cannot display wallpapers until you have entered a valid location, so that it can calculate sunrise and sunset times for your location. Are you sure you want to cancel and quit the program?"
94+
msgstr ""
95+
96+
#: src\InputDialog.Designer.cs:45
97+
msgid "Enter your location:"
98+
msgstr ""
99+
100+
#: src\InputDialog.Designer.cs:62
101+
msgid "OK"
102+
msgstr ""
103+
104+
#: src\InputDialog.Designer.cs:73
105+
msgid "Cancel"
106+
msgstr ""
107+
108+
#: src\InputDialog.Designer.cs:84
109+
msgid "Use Windows location service"
110+
msgstr ""
111+
112+
#: src\InputDialog.Designer.cs:105
113+
msgid "Change Location"
114+
msgstr ""
115+
116+
#: src\LocationManager.cs:40
117+
msgid "Welcome! Please enter your location so the app can determine sunrise and sunset times."
118+
msgstr ""
119+
120+
#: src\MainMenu.cs:33
121+
msgid "&Select Theme..."
122+
msgstr ""
123+
124+
#: src\MainMenu.cs:40
125+
msgid "&Change Location..."
126+
msgstr ""
127+
128+
#: src\MainMenu.cs:44
129+
msgid "Enable &Dark Mode"
130+
msgstr ""
131+
132+
#: src\MainMenu.cs:46
133+
msgid "&Start on Boot"
134+
msgstr ""
135+
136+
#: src\MainMenu.cs:48
137+
msgid "More &Options"
138+
msgstr ""
139+
140+
#: src\MainMenu.cs:53
141+
msgid "&Refresh Wallpaper"
142+
msgstr ""
143+
144+
#: src\MainMenu.cs:59
145+
msgid "&Check for Updates"
146+
msgstr ""
147+
148+
#: src\MainMenu.cs:62
149+
msgid "E&xit"
150+
msgstr ""
151+
152+
#: src\ProgressDialog.cs:48
153+
msgid "Importing themes, please wait..."
154+
msgstr ""
155+
156+
#: src\ProgressDialog.Designer.cs:42
157+
msgid "Downloading images, please wait..."
158+
msgstr ""
159+
160+
#: src\ThemeDialog.cs:129
161+
msgid "Image Credits: {0}"
162+
msgstr ""
163+
164+
#: src\ThemeDialog.cs:134
165+
msgid "Image Credits: Microsoft"
166+
msgstr ""
167+
168+
#: src\ThemeDialog.cs:202
169+
msgid "Image {0} of {1}"
170+
msgstr ""
171+
172+
#: src\ThemeDialog.cs:247
173+
msgid "Failed to download images for the '{0}' theme."
174+
msgstr ""
175+
176+
#: src\ThemeDialog.cs:283
177+
msgid "None"
178+
msgstr ""
179+
180+
#: src\ThemeDialog.cs:445
181+
msgid "Are you sure you want to remove the '{0}' theme?"
182+
msgstr ""
183+
184+
#: src\ThemeDialog.cs:472
185+
msgid "WinDynamicDesktop cannot dynamically update your wallpaper until you have selected a theme. Are you sure you want to continue without a theme selected?"
186+
msgstr ""
187+
188+
#: src\ThemeDialog.Designer.cs:79
189+
msgid "Preview"
190+
msgstr ""
191+
192+
#: src\ThemeDialog.Designer.cs:147
193+
msgid "Enable Dark Mode"
194+
msgstr ""
195+
196+
#: src\ThemeDialog.Designer.cs:158
197+
msgid "Apply"
198+
msgstr ""
199+
200+
#: src\ThemeDialog.Designer.cs:182
201+
msgid "Get more themes online"
202+
msgstr ""
203+
204+
#: src\ThemeDialog.Designer.cs:191
205+
msgid "Import from file..."
206+
msgstr ""
207+
208+
#: src\ThemeDialog.Designer.cs:215
209+
msgid "Remove"
210+
msgstr ""
211+
212+
#: src\ThemeDialog.Designer.cs:249
213+
msgid "Select Theme"
214+
msgstr ""
215+
216+
#: src\ThemeManager.cs:95
217+
msgid "The '{0}' theme is already installed. Do you want to overwrite it?"
218+
msgstr ""
219+
220+
#: src\ThemeManager.cs:144
221+
msgid ""
222+
"Failed to import theme from {0}\n"
223+
"\n"
224+
"{1}"
225+
msgstr ""
226+
227+
#: src\ThemeManager.cs:250
228+
msgid "The '{0}' theme could not be loaded and has been disabled. This is probably because it was created for an older version of the app or its config file is formatted incorrectly."
229+
msgstr ""
230+
231+
#: src\ThemeManager.cs:296
232+
msgid "Failed to download images. Click Retry to try again, Ignore to continue with some themes disabled, or Abort to exit the program."
233+
msgstr ""
234+
235+
#: src\UpdateChecker.cs:53
236+
msgid "Check for &updates automatically once a week"
237+
msgstr ""
238+
239+
#: src\UpdateChecker.cs:99
240+
msgid "WinDynamicDesktop could not connect to the Internet to check for updates."
241+
msgstr ""
242+
243+
#: src\UpdateChecker.cs:104
244+
msgid ""
245+
"There is a newer version of WinDynamicDesktop available. Do you want to download the update now?\n"
246+
"\n"
247+
"Current Version: {0}\n"
248+
"Latest Version: {1}"
249+
msgstr ""
250+
251+
#: src\UpdateChecker.cs:107 src\UpdateChecker.cs:134 src\UpdateChecker.cs:174
252+
msgid "Update Available"
253+
msgstr ""
254+
255+
#: src\UpdateChecker.cs:116
256+
msgid "You already have the latest version of WinDynamicDesktop installed."
257+
msgstr ""
258+
259+
#: src\UpdateChecker.cs:117
260+
msgid "Up To Date"
261+
msgstr ""
262+
263+
#: src\UpdateChecker.cs:133
264+
msgid "WinDynamicDesktop {0} is available. Click here to download it."
265+
msgstr ""
266+
267+
#: src\UwpLocation.cs:44
268+
msgid "WinDynamicDesktop needs location access for this feature. Click OK to open the Windows 10 location settings and grant location access to the app, then select the checkbox again."
269+
msgstr ""
270+
271+
#: src\UwpLocation.cs:47
272+
msgid "Location Access"
273+
msgstr ""

installer.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ begin
5757
DelTree(ExpandConstant('{app}\themes'), true, true, true);
5858
DeleteFile(ExpandConstant('{app}\settings.conf'));
5959
DeleteFile(ExpandConstant('{app}\{#MyAppExeName}.log'));
60-
DeleteFile(ExpandConstant('{app}\{#MyAppExeName}.pth'));
60+
DeleteFile(ExpandConstant('{app}\{#MyAppName}.pth'));
6161
RemoveDir(ExpandConstant('{app}'));
6262
end;
6363

src/ProgressDialog.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public partial class ProgressDialog : Form
1717
private Queue<ThemeConfig> downloadQueue;
1818
private Queue<string> importQueue;
1919
private int numJobs;
20+
private IntPtr taskbarHandle;
2021

2122
private WebClient wc = new WebClient();
2223

@@ -27,6 +28,7 @@ public ProgressDialog()
2728

2829
this.Font = SystemFonts.MessageBoxFont;
2930
this.FormClosing += OnFormClosing;
31+
taskbarHandle = this.Handle;
3032

3133
wc.DownloadProgressChanged += OnDownloadProgressChanged;
3234
wc.DownloadFileCompleted += OnDownloadFileCompleted;
@@ -95,12 +97,13 @@ private void ImportNext()
9597
ThemeManager.importPaths.Clear();
9698
}
9799

100+
this.Invoke(new Action(() => UpdateTotalPercentage(0)));
101+
98102
if (importQueue.Count > 0)
99103
{
100-
this.Invoke(new Action(() => UpdateTotalPercentage(0)));
101104
string themePath = importQueue.Peek();
102105

103-
ThemeConfig theme = ThemeManager.ImportTheme(themePath, this.Handle);
106+
ThemeConfig theme = ThemeManager.ImportTheme(themePath, taskbarHandle);
104107

105108
if (theme != null)
106109
{

0 commit comments

Comments
 (0)