-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internationalize Core, CmdLine, ConsoleUI, and AutoUpdater #3482
Internationalize Core, CmdLine, ConsoleUI, and AutoUpdater #3482
Conversation
This comment has been minimized.
This comment has been minimized.
b90ae70
to
35a5ea6
Compare
This comment has been minimized.
This comment has been minimized.
6fcfc29
to
b8dd543
Compare
OK, the test updates are done and it should be safe to pull and rebase now. The new tests are probably unnecessary, as |
bef9363
to
96155bd
Compare
f4fa019
to
4435467
Compare
This comment was marked as resolved.
This comment was marked as resolved.
The French translation is now done, but I will spend some more time proofreading and checking if everything fits as intended :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
French translation is good to serve 😁
8d3a0d5
to
9df9ac8
Compare
9df9ac8
to
65223eb
Compare
This comment was marked as outdated.
This comment was marked as outdated.
20832f6
to
016a224
Compare
016a224
to
1b1d181
Compare
Rebased to resolve conflicts with #3515. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've given a cursory read over, all looks ok with the following extra assumptions:
- Build changes included to support Internationalisation work?
- Renaming of
ksp
->instance
part of an ongoing generalisation of the codebase for multigame
<Compile Include="Main.cs" /> | ||
<Compile Include="Options.cs" /> | ||
<Compile Include="ProgressReporter.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume the optimisations make manually defining these not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two main styles of .csproj
file; the older one requires specifying all the files, but the newer one scans whatever files are in the directory instead. We're switching from the old style to new style, as was previously done for Core, since it's much more convenient for maintenance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one of these lines pulls in the standard rules for finding all the files:
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> |
CKAN/AutoUpdate/CKAN-autoupdate.csproj
Line 45 in 1b1d181
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> |
Yes,
Yup, we did a pass of those changes already but there are still a few left. I try to catch them when I'm changing something nearby. |
Hello Guys, it's good to see you again. Glad to see that the translation project moved to Crowdin, I'll made my contributions there. Best regards. |
Welcome back, @gsantos9489, and it's great to hear from you as well! The Crowdin thing is fantastic, but FYI we have not yet fully integrated it into our work flows. I need to get on #3653 to figure out how to do that. It's probably time to give up hope of finding a standard XML diffing solution and fall back to making our own custom utility. |
Well, I'll keep myself updated about the translation work flow and read about Crowdin <-> GitHub integration. |
Oh don't worry, it will work; it's just a matter of figuring out how to check what is in that first set of changes so they can be merged safely. |
✔️ We now have a script to filter out non-significant changes from diffs, so keeping up with Crowdin should be a lot easier: Lines 1 to 32 in e2aca52
|
Background
In #2749 we created the ability to translate strings visible in GUI, so more users could use CKAN in their own languages. This has proven surprisingly successful, with six complete translations submitted so far covering a sizable chunk of the human population (listing them as an excuse to tag the authors for notifications):
Motivation
GUI still displays many untranslated strings from the Core project, especially with regard to dependencies, conflicts, and installing, which can be important when there is a problem to report to the user. Now that #3471 has resolved a long-standing formatting issue related to translations, it should be safe to translate more strings. And if we translate Core, then it would be weird to view localized Core strings via an untranslated CmdLine or ConsoleUI front end. CmdLine probably has very few users, but most Mac users nowadays are probably on ConsoleUI.
Changes
CKAN.GUI
namespace to prevent collisions with the other projects, which each already have their own namespacesCKAN.Properties.Resources
toCKAN.GUI.Properties.Resources
so Core can rightfully claim the resources of the root namespaceProperties/Resources.resx
file (yes, I did this by hand, one string at a time), accessible via static properties onProperties.Resources
, just like for GUI, so translations can now be created for these projects as welldeserialization
andlicense
) moved into that locale and replaced by their UK equivalents in the default localeSingleAssemblyResourceManager
to make sure its resources can be found in the repacked EXE (maybe this should be shared, but I'm focused on getting it all done and working now)build.cake
now gets the resource DLLs from_build/out/CKAN-CmdLine/<configuration>/bin/net45
(the compiler puts them here thanks to CmdLine's project references to Core, CmdLine, and ConsoleUI)GUI.MainChangesetNewInstall
are moved toCore.RelationshipResolverUserReason
and the weird GUI hack around that resource is removedCKAN-AutoUpdateHelper.exe
and repacked toAutoUpdater.exe
(which cannot be changed because the previous release will look for that name on GitHub) including all of its resource DLLs, using theILRepack
MSBuild TaskAutoUpdater
toCKAN.AutoUpdateHelper
, becauseCKAN.AutoUpdate
is a class in CoreI expect we may have some glitches as in #2899, but I do not use JetBrains Idea Rider, so hopefully we can work through those once they are identified.
The translation instructions are here and will need to be updated after merge to reflect the additional
.resx
files:All past, present, and future translators are gratefully invited to start hacking away at the new
.resx
files! Recommended ways to collaborate:Submitting your changes via git commits will ensure that your changes remain linked to your user name so everyone can see that you helped out! Thanks in advance for any contributions!
Tracking the translations Included in this PR:
Exceptions and notes
A few things are not internationalized:
ConsoleKeyInfo
objects to specify the key, which I do not know how to encode into a.resx
fileA few things need to be translated carefully:
Properties.Resources.UserYesNoPromptSuffix
,Properties.Resources.UserYesNoY
,Properties.Resources.UserYesNoYes
,Properties.Resources.UserYesNoN
,Properties.Resources.UserYesNoNo
, andProperties.Resources.UserYesNoInvalid
must all match up! These strings are not just displayed but also compared to user input; we are involving the translator a bit in the UI design/function here so German users can say Ja oder Nein.Properties.Resources.UserSelectionPromptWithDefault
andProperties.Resources.UserSelectionPromptWithoutDefault
must matchProperties.Resources.UserSelectionC
andProperties.Resources.UserSelectionN
Side fixes
csproj
format that doesn't require listing every source fileRelationshipDescriptor.RequiredVersion
wasn't being used and is removedCore/Types/ModuleResolution.cs
wasn't being used and is removeddoc/building.md
no longer mentions Travis, which has been out of use for quite a whileckan help
no longer prints uselesshelp -
andUsage: ckan help [options]
lines at the startIGame.ShortName
ConsoleUI/Properties.Settings.*
files were not being used and are removedckan verb --help
for simple commands previously started withverb - description
and is nowckan verb - description
string.Format
are removed where the result is passed toRaiseMessage
orRaiseError
, which do their own identical formatting (and I think I accidentally created an instance of this, and I look forward to it being spotted in the diffs)