Skip to content

Conversation

@vodek3
Copy link

@vodek3 vodek3 commented Jan 28, 2023

I made some changes in the localization part of the Open-Shell Menu.

  1. Src\Localization\English, Russian
    Add to Help two chapters Start Menu Skinning Tutorial and Custom Start Buttons Tutorial

  2. Src\Localization\ChineseTW, Chinese, English, French, German, Polish, Russian, Spanish
    Change window title: Help -> Open-Shell Help

  3. Adding the ability to localize Immersive/Immersive7 skins
    Add Strings for translation:

7039	Menu theme 7040	Light 7041	Dark 7042	Use system setting 7043	Transparency style 7044	Two-tone 7045	Full glass 7111	Immersive skin\n\nA skin that uses immersive colors and modern visual elements in the style of Windows 10.\n\nPart of <A HREF="https://github.com/Open-Shell/Open-Shell-Menu/">Open-Shell</A> (c) 2009-2017, Ivo Beltchev 

Immersive

IDS_STRING7101 "Windows Aero skin\n\nDefault skin to use for the Windows Aero theme.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> (c) 2009-2017, Ivo Beltchev"
IDS_STRING7102 "Windows Basic skin\n\nDefault skin to use for the Windows Basic theme.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> (c) 2009-2017, Ivo Beltchev"
IDS_STRING7103 "Classic skin\n\nClassic look with large or small icons.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> (c) 2009-2017, Ivo Beltchev"
IDS_STRING7100 "This is the default skin when no other skin is selected or if the selected skin fails to load.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> 2009-2017, Ivo Beltchev" 2009-2017, Ivo Beltchev"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't look like wanted changes.
It adds duplicated copyright string.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I see. I solve it, but You are was first, ;-)

IDS_STRING7108 "Midnight skin\n\nSkin with dark background.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> (c) 2009-2017, Ivo Beltchev"
IDS_STRING7109 "Metro skin\n\nSkin that uses the start screen colors.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> (c) 2009-2017, Ivo Beltchev"
IDS_STRING7110 "Metallic skin\n\nA start menu skin with metallic look.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> (c) 2009-2017, Ivo Beltchev"
IDS_STRING7104 "Full Glass skin\n\nTransparent menu with large or small icons.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> 2009-2017, Ivo Beltchev" 2009-2017, Ivo Beltchev"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.
Please, revert these unnecessary changes.

IDS_STRING7108 "Midnight skin\n\nSkin with dark background.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> 2009-2017, Ivo Beltchev" 2009-2017, Ivo Beltchev"
IDS_STRING7109 "Metro skin\n\nSkin that uses the start screen colors.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> 2009-2017, Ivo Beltchev" 2009-2017, Ivo Beltchev"
IDS_STRING7110 "Metallic skin\n\nA start menu skin with metallic look.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> 2009-2017, Ivo Beltchev" 2009-2017, Ivo Beltchev"
IDS_STRING7111 "Immersive skin\n\nA skin that uses immersive colors and modern visual elements in the style of Windows 10.\n\nPart of <A HREF=""https://github.com/Open-Shell/Open-Shell-Menu/"">Open-Shell</A> © 2009-2017, Ivo Beltchev"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other strings use (c) instead of ©.
Lets keep it consistent (and use the same as in other stings here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>Custom Start Buttons</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of these changes in .html files?
And how is it related to Change window title Help -> Open-Shell Help?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of these changes in .html files?
When localizing, we change the same fields by replacing the words of one language with another.
If the field - <title> tag is located in the same place, on the same line, then this speeds up its search, editing and replacing words with another language. In this case, the <title> tag
in all files is on the 4th line. Unification and ease of editing.
image

And what does this have to do with Change Help Window Title -> Open-Shell Help?
Sorry, this has nothing to do with changing the title of the help window. My omission - not enough well mastered GitHub Desktop...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oki. I guess it makes sense to have these files as similar as possible (so the structure of files is the same, only localized strings will differ).

But please, do such change in separate commit. So it won't mix with other (real) changes and makes it easier to review.

Copy link
Author

@vodek3 vodek3 Jan 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments and clarifications.
I initially set goals simply to make it possible to fully localize Open-Shell.
And having edited resources the Strings in StartMenuDLL.dll and SKIN in Immersive.skin7/Immersive.skin, I realized that it is necessary to make changes in the sources.
It turned out in some way confusion + Visual Studio warning.
I'm confused myself...

Briefly speaking.
There is a common task - Full localization of Open-Shell, it consists of translating resource strings + html help files.

  1. I made minimal changes to the html files (English) + added two chapters to help.
  2. Added a title to the Help window in all languages
  3. Added resource strings to StartMenu/StartMenuDLL/StartMenuDLL.rc
  4. Changed (because VS warning!)
src/Skins/Immersive/Immersive.vcxproj Src/Skins/Immersive/Immersive.vcxproj.filters 
src/Skins/Immersive/Immersive7.vcxproj Src/Skins/Immersive/Immersive7.vcxproj.filters 

How to do better? To make it more convenient for everyone.
Should I delete my repository along with the commits and create a new one by cloning?
And then create commits on points 1-4

Or will you use p. 3, p. 4

I'll try not to create chaos in the future. ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I delete my repository along with the commits and create a new one by cloning?

There is no need to delete anything.
You can modify commits on your branch via git interactive rebase (just google for it if you are not familiar) and then force push.

The advantage of git is that you can do everything locally on your machine and then once commits look good you can just push them to remote repository.

How to do better? To make it more convenient for everyone.

Simply keep in mind that it is better to not mix unrelated things in single commit.

I made minimal changes to the html files (English) + added two chapters to help.

From this description you can see you did two independent things.
So one commit should contain just adjustments in html files, that basically doesn't add anything new, just allows easier comparison of those files across languages.
The other commit should add new content to the help.

Changed (because VS warning!)

This is already fixed on master (see my other comment), so there is no need for this change anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another advice.
If you are not familiar with git and the way to work with commits locally, then I'd recommend to create one PR per change you want to do.

So if you want to change 4 different things then just create separate PR for each one (one PR after another).
That way it may be easier to focus on each partial change and commits in the PR will get squashed in the end (as they will be related to the same thing).

What about that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is very clear - about one action - one commit.
Ща вкурим про git interactive rebase и всё. ;-)

@@ -0,0 +1,143 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding these files doesn't seem to be related to Change window title Help -> Open-Shell Help.
Please, add unrelated changes in separate commit.

@ge0rdi ge0rdi requested a review from bonzibudd January 29, 2023 09:54
@ge0rdi
Copy link
Member

ge0rdi commented Jan 29, 2023

Please, put unrelated changes to separate commits.
For example your Correction commit contains 3 different things. Some of them are fixups of earlier commits (for those git commit --fixup ... will be much better, as that way it will be simpler to squash such fixups to appropriate commits). Some are completely new changes.

Please, don't mix unrelated things in single commit.

<Text Include="SkinDescription.txt" />
</ItemGroup>
<ItemGroup>
<Image Include="*.png" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unwanted change, please, revert it.

Because VS2022 warning ".vcxproj files and wildcards"

I've noticed the warning, but it seems that everything works without any issue.
I was thinking of defining ReplaceWildcardsInProjectItems property as the MS page recommends, but didn't get to it yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of defining ReplaceWildcardsInProjectItems property as the MS page recommends

In fact that's not good idea either as with that property VS will populate all the existing files matching wildcard and it will get saved to disk when project is saved.

Better solution is to use ReadOnlyProject property.
As these skin projects are basically created just once and then they are not supposed to be changed (from VS).

I will do that eventually.

Copy link
Author

@vodek3 vodek3 Jan 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that the absence of warnings is convenient, not distracting.
Among other things, I have already made changes that exclude warnings. ;-)

As far as I understand, need to create a resource header files resource.h and add 3/5 lines to the end of the files:
Immersive[7].vcxproj.filters

 <ItemGroup> <ClInclude Include="resource.h"> <Filter>Resource Files</Filter> </ClInclude> </ItemGroup> 

Immersive[7].vcxproj

 <ItemGroup> <ClInclude Include="resource.h" /> </ItemGroup> 

But I haven't figured out how...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed the change to master already d0ad104

… Buttons Tutorial 1. Adding to Help Chapters Start Menu Skinning Tutorial and Custom Start Buttons Tutorial 2. Change window title Help -> Open-Shell Help
Add Strings: 7039	Menu theme 7040	Light 7041	Dark 7042	Use system setting 7043	Transparency style 7044	Two-tone 7045	Full glass 7111	Immersive skin\n\nA skin that uses immersive colors and modern visual elements in the style of Windows 10.\n\nPart of <A HREF="https://github.com/Open-Shell/Open-Shell-Menu/">Open-Shell</A> © 2009-2017, Ivo Beltchev
a) Add Strings for translation: 7039 Menu theme 7040 Light 7041 Dark 7042 Use system setting 7043 Transparency style 7044 Two-tone 7045 Full glass 7111 Immersive skin\n\nA skin that uses immersive colors and modern visual elements in the style of Windows 10.\n\nPart of Open-Shell (c) 2009-2017, Ivo Beltchev b) (с) in each string c) VS2022 warning ".vcxproj files and wildcards" Because VS2022 warning ".vcxproj files and wildcards" https://learn.microsoft.com/en-us/cpp/build/reference/vcxproj-files-and-wildcards?view=msvc-170
@vodek3 vodek3 closed this Jan 29, 2023
@vodek3 vodek3 reopened this Jan 29, 2023
Copy link
Member

@bonzibudd bonzibudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright is still 2018 in most other project files, those should also be changed to match.

@ge0rdi
Copy link
Member

ge0rdi commented Jan 30, 2023

Copyright is still 2018 in most other project files, those should also be changed to match.

I don't like the idea of changing copyright string each year.
To avoid that we should rather change copyright notices to contain just single year (when given file was introduced) instead of range of years.
Though I'm not even sure we need to care about that. But that's for internal team discussion.

@vodek3
Please, remove copyright string changes from this PR.
We will modify them if necessary.

@vodek3 vodek3 closed this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants