Skip to content

Commit

Permalink
Add list of translation strings and fix several small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0thyj committed Mar 6, 2019
1 parent c14a46f commit 6afa732
Show file tree
Hide file tree
Showing 8 changed files with 296 additions and 22 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ packages/
Package.StoreAssociation.xml
_pkginfo.txt
images.zip
messages.pot
settings.conf
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ After you have chosen a theme and entered your location, the app will minimize t

## Frequently Asked Questions

### Why did I develop this?
### Why did you develop this?

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.

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

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.

### How can you customize the images?
### How can I customize the images?

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).

### How can you hide the tray icon?
### How can I hide the tray icon?

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.

### How can I change the folder where config files are stored?

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.

## Legal and Privacy Stuff
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/).

Expand Down
9 changes: 5 additions & 4 deletions i18n/gettext.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import time
from collections import OrderedDict

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


Expand Down Expand Up @@ -54,14 +55,14 @@ def add_to_pot_data(msgid, filename, lineno):
"#",
"msgid \"\"",
"msgstr \"\"",
"\"Project-Id-Version: PACKAGE VERSION\\n\"",
"\"Project-Id-Version: {}\\n\"".format(app_name),
"\"POT-Creation-Date: {}\\n\"".format(time.strftime("%Y-%m-%d %H:%M%z")),
"\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"",
"\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"",
"\"Language-Team: LANGUAGE <[email protected]>\\n\"",
"\"MIME-Version: 1.0\\n\"",
"\"Content-Type: text/plain; charset=CHARSET\\n\"",
"\"Content-Transfer-Encoding: ENCODING\\n\""
"\"Content-Type: text/plain; charset=UTF-8\\n\"",
"\"Content-Transfer-Encoding: 8bit\\n\""
]

for msgid, locs in pot_data.items():
Expand Down
273 changes: 273 additions & 0 deletions i18n/messages.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: WinDynamicDesktop\n"
"POT-Creation-Date: 2019-03-05 09:10-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: src\AboutDialog.cs:58
msgid "Thanks to:"
msgstr ""

#: src\AboutDialog.cs:60
msgid "Apple for the Mojave wallpapers"
msgstr ""

#: src\AboutDialog.cs:61
msgid "Contributors on GitHub"
msgstr ""

#: src\AboutDialog.cs:62
msgid "LocationIQ for their free geocoding API"
msgstr ""

#: src\AboutDialog.cs:63
msgid "Roundicons from flaticon.com for the icon (licensed by CC 3.0 BY)"
msgstr ""

#: src\AboutDialog.Designer.cs:67
msgid "Copyright © 2019 Timothy Johnson"
msgstr ""

#: src\AboutDialog.Designer.cs:76
msgid "Port of macOS Mojave Dynamic Desktop feature to Windows 10"
msgstr ""

#: src\AboutDialog.Designer.cs:97 src\ThemeDialog.Designer.cs:170
msgid "Close"
msgstr ""

#: src\AboutDialog.Designer.cs:108
msgid "Credits"
msgstr ""

#: src\AboutDialog.Designer.cs:119
msgid "Donate"
msgstr ""

#: src\AboutDialog.Designer.cs:154
msgid "About WinDynamicDesktop"
msgstr ""

#: src\AppContext.cs:67
msgid "Another instance of WinDynamicDesktop is already running. You can access it by clicking on the icon in the system tray."
msgstr ""

#: 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
msgid "Error"
msgstr ""

#: src\AppContext.cs:111
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."
msgstr ""

#: src\InputDialog.cs:93
msgid ""
"Is this location correct?\n"
"\n"
"{0}\n"
"Sunrise: {1}, Sunset: {2}"
msgstr ""

#: src\InputDialog.cs:96 src\InputDialog.cs:154 src\ThemeDialog.cs:446 src\ThemeDialog.cs:474 src\ThemeManager.cs:96
msgid "Question"
msgstr ""

#: src\InputDialog.cs:112
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."
msgstr ""

#: src\InputDialog.cs:134
msgid "Failed to get location from Windows location service."
msgstr ""

#: src\InputDialog.cs:151
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?"
msgstr ""

#: src\InputDialog.Designer.cs:45
msgid "Enter your location:"
msgstr ""

#: src\InputDialog.Designer.cs:62
msgid "OK"
msgstr ""

#: src\InputDialog.Designer.cs:73
msgid "Cancel"
msgstr ""

#: src\InputDialog.Designer.cs:84
msgid "Use Windows location service"
msgstr ""

#: src\InputDialog.Designer.cs:105
msgid "Change Location"
msgstr ""

#: src\LocationManager.cs:40
msgid "Welcome! Please enter your location so the app can determine sunrise and sunset times."
msgstr ""

#: src\MainMenu.cs:33
msgid "&Select Theme..."
msgstr ""

#: src\MainMenu.cs:40
msgid "&Change Location..."
msgstr ""

#: src\MainMenu.cs:44
msgid "Enable &Dark Mode"
msgstr ""

#: src\MainMenu.cs:46
msgid "&Start on Boot"
msgstr ""

#: src\MainMenu.cs:48
msgid "More &Options"
msgstr ""

#: src\MainMenu.cs:53
msgid "&Refresh Wallpaper"
msgstr ""

#: src\MainMenu.cs:59
msgid "&Check for Updates"
msgstr ""

#: src\MainMenu.cs:62
msgid "E&xit"
msgstr ""

#: src\ProgressDialog.cs:48
msgid "Importing themes, please wait..."
msgstr ""

#: src\ProgressDialog.Designer.cs:42
msgid "Downloading images, please wait..."
msgstr ""

#: src\ThemeDialog.cs:129
msgid "Image Credits: {0}"
msgstr ""

#: src\ThemeDialog.cs:134
msgid "Image Credits: Microsoft"
msgstr ""

#: src\ThemeDialog.cs:202
msgid "Image {0} of {1}"
msgstr ""

#: src\ThemeDialog.cs:247
msgid "Failed to download images for the '{0}' theme."
msgstr ""

#: src\ThemeDialog.cs:283
msgid "None"
msgstr ""

#: src\ThemeDialog.cs:445
msgid "Are you sure you want to remove the '{0}' theme?"
msgstr ""

#: src\ThemeDialog.cs:472
msgid "WinDynamicDesktop cannot dynamically update your wallpaper until you have selected a theme. Are you sure you want to continue without a theme selected?"
msgstr ""

#: src\ThemeDialog.Designer.cs:79
msgid "Preview"
msgstr ""

#: src\ThemeDialog.Designer.cs:147
msgid "Enable Dark Mode"
msgstr ""

#: src\ThemeDialog.Designer.cs:158
msgid "Apply"
msgstr ""

#: src\ThemeDialog.Designer.cs:182
msgid "Get more themes online"
msgstr ""

#: src\ThemeDialog.Designer.cs:191
msgid "Import from file..."
msgstr ""

#: src\ThemeDialog.Designer.cs:215
msgid "Remove"
msgstr ""

#: src\ThemeDialog.Designer.cs:249
msgid "Select Theme"
msgstr ""

#: src\ThemeManager.cs:95
msgid "The '{0}' theme is already installed. Do you want to overwrite it?"
msgstr ""

#: src\ThemeManager.cs:144
msgid ""
"Failed to import theme from {0}\n"
"\n"
"{1}"
msgstr ""

#: src\ThemeManager.cs:250
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."
msgstr ""

#: src\ThemeManager.cs:296
msgid "Failed to download images. Click Retry to try again, Ignore to continue with some themes disabled, or Abort to exit the program."
msgstr ""

#: src\UpdateChecker.cs:53
msgid "Check for &updates automatically once a week"
msgstr ""

#: src\UpdateChecker.cs:99
msgid "WinDynamicDesktop could not connect to the Internet to check for updates."
msgstr ""

#: src\UpdateChecker.cs:104
msgid ""
"There is a newer version of WinDynamicDesktop available. Do you want to download the update now?\n"
"\n"
"Current Version: {0}\n"
"Latest Version: {1}"
msgstr ""

#: src\UpdateChecker.cs:107 src\UpdateChecker.cs:134 src\UpdateChecker.cs:174
msgid "Update Available"
msgstr ""

#: src\UpdateChecker.cs:116
msgid "You already have the latest version of WinDynamicDesktop installed."
msgstr ""

#: src\UpdateChecker.cs:117
msgid "Up To Date"
msgstr ""

#: src\UpdateChecker.cs:133
msgid "WinDynamicDesktop {0} is available. Click here to download it."
msgstr ""

#: src\UwpLocation.cs:44
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."
msgstr ""

#: src\UwpLocation.cs:47
msgid "Location Access"
msgstr ""
2 changes: 1 addition & 1 deletion installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ begin
DelTree(ExpandConstant('{app}\themes'), true, true, true);
DeleteFile(ExpandConstant('{app}\settings.conf'));
DeleteFile(ExpandConstant('{app}\{#MyAppExeName}.log'));
DeleteFile(ExpandConstant('{app}\{#MyAppExeName}.pth'));
DeleteFile(ExpandConstant('{app}\{#MyAppName}.pth'));
RemoveDir(ExpandConstant('{app}'));
end;
Expand Down
7 changes: 5 additions & 2 deletions src/ProgressDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public partial class ProgressDialog : Form
private Queue<ThemeConfig> downloadQueue;
private Queue<string> importQueue;
private int numJobs;
private IntPtr taskbarHandle;

private WebClient wc = new WebClient();

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

this.Font = SystemFonts.MessageBoxFont;
this.FormClosing += OnFormClosing;
taskbarHandle = this.Handle;

wc.DownloadProgressChanged += OnDownloadProgressChanged;
wc.DownloadFileCompleted += OnDownloadFileCompleted;
Expand Down Expand Up @@ -95,12 +97,13 @@ private void ImportNext()
ThemeManager.importPaths.Clear();
}

this.Invoke(new Action(() => UpdateTotalPercentage(0)));

if (importQueue.Count > 0)
{
this.Invoke(new Action(() => UpdateTotalPercentage(0)));
string themePath = importQueue.Peek();

ThemeConfig theme = ThemeManager.ImportTheme(themePath, this.Handle);
ThemeConfig theme = ThemeManager.ImportTheme(themePath, taskbarHandle);

if (theme != null)
{
Expand Down
Loading

0 comments on commit 6afa732

Please sign in to comment.