Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Dec 2, 2019

I will be making multiple PRs for localization changes, hopefully one per tool. This PR is copying what android does for localization for more context see: dotnet/android#3900 and https://github.com/xamarin/monodroid/wiki/Localization

Copy link
Contributor

@spouliot spouliot left a comment

Choose a reason for hiding this comment

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

Not sure how the whole "fix a typo" process would work ?
I suspect (hope) there's not need to update all .xlf files but, beside that, I would not know how to proceed.

@ghost
Copy link
Author

ghost commented Dec 2, 2019

Not sure how the whole "fix a typo" process would work ?
I suspect (hope) there's not need to update all .xlf files but, beside that, I would not know how to proceed.

It works by editing Resources.resx in visual studio. The xlf and and designeer.cs files will be updated/generated automatically. There is documentation in the android pr ( dotnet/android#3900 ) that does a better job of explaining the process . I will port the documentation eventually.

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

2 tests failed, 86 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed
  • Generator tests/NUnit: BuildFailure

Copy link
Contributor

@VincentDondain VincentDondain left a comment

Choose a reason for hiding this comment

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

Looking good 👍

Couple items we could discuss as a team:

  1. Should we take that change to improve the error messages?
    • That is make sure all sentences start with a capital letter and end with a period.
    • Remove error codes from the error message (redundant)
    • Always put methods and properties between ' ' (apostrophes)
  2. This is gonna be tedious but I suggest we consider adding <comment> for most errors to tell translators what to avoid translating (e.g: "runtime", "BaseType", "binding", etc.
    • Background, I dogfooded the French translations of VSMac and a lot of things were translated when they didn't need to be.
    • We need guidance on that, the Android team might be facing the same questions and the IDE folks might be able to help us too.

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

2 tests failed, 86 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed
  • Generator tests/NUnit: BuildFailure

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

🔥 Build failed 🔥

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

2 tests failed, 86 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed
  • Generator tests/NUnit: BuildFailure

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

2 tests failed, 86 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed
  • Generator tests/NUnit: BuildFailure

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

2 tests failed, 86 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed
  • Generator tests/NUnit: BuildFailure

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

1 tests failed, 87 tests passed.

Failed tests

  • Generator tests/NUnit: Failed (Execution failed with exit code 4)

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

🔥 Build failed 🔥

@ghost
Copy link
Author

ghost commented Dec 10, 2019

build

Copy link
Member

@rolfbjarne rolfbjarne left a comment

Choose a reason for hiding this comment

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

Question: should we create src/bgen subdirectory and put every new file there? The src/ directory is getting crowded... this would only be for new files in this PR, but eventually all the bgen source files would go there.

Co-Authored-By: Rolf Bjarne Kvinge <[email protected]>
@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
🔥 Test run failed 🔥

Test results

1 tests failed, 87 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed

sb.Append (ParameterGetMarshalType (new MarshalInfo (this, mi) { IsAligned = aligned, EnumMode = enum_mode } ));
} catch (BindingException ex) {
throw new BindingException (ex.Code, ex.Error, ex, "{0} in method `{1}'", ex.Message, mi.Name);
throw new BindingException (1078, ex.Error, ex, ex.Message, mi.Name);
Copy link
Member

Choose a reason for hiding this comment

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

Why do we go from ex.Code to 1078? Is ex.Code always the same, if it is not, we are going to get the wrong message.

BindingFlags.GetProperty);

var errorMessage = prop == null ? String.Format (bgen.Resources._default, errorCode) :
(String) prop.GetValue (null);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
(String) prop.GetValue (null);
prop.GetValue (null) as string;

To avoid cast exceptions?

Copy link
Member

Choose a reason for hiding this comment

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

Cast exceptions are usually easier to diagnose than null reference exceptions, so I think the current code is fine.

internal Resources() {
}

[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this file isn't code-formatted to our guidelines. Edit->Format->Format Document on Visual Studio does the trick

Copy link
Author

Choose a reason for hiding this comment

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

This file is auto-generated.

BindingFlags.GetProperty);

var errorMessage = prop == null ? String.Format (bgen.Resources._default, errorCode) :
(String) prop.GetValue (null);
Copy link
Member

Choose a reason for hiding this comment

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

Cast exceptions are usually easier to diagnose than null reference exceptions, so I think the current code is fine.

@ghost ghost merged commit 729e241 into dotnet:master Jan 8, 2020
@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

@rolfbjarne rolfbjarne added the not-notes-worthy Ignore for release notes label Sep 10, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants