dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.07k stars 4.04k forks source link

Localization misinterpretation #62504

Closed DoctorKrolic closed 3 weeks ago

DoctorKrolic commented 2 years ago

Version Used: VS 2022 v17.3 Preview 2

There is a codefix named Inline temporary variable, that, well, inlines the local temporary variable. However, the name Inline temporary variable without context can be translated in 2 different ways: when "inline" is a verb and when it is a adjective. Obviously, for the codefix name we need a "verb-variant". The localization team was non aware of the context, however, so they've chosen the wrong variant (at least for ru localization): https://github.com/dotnet/roslyn/blob/d9336d33fc7bfe06750203f0d6b45caf0e0a85fc/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf#L190-L194 and here https://github.com/dotnet/roslyn/blob/d9336d33fc7bfe06750203f0d6b45caf0e0a85fc/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ru.xlf#L70-L74

So the localization needs to be revised for all locales (and should probably add a note, that "inline" is a verb to avoid possible mistakes in the future), e.g. (ru):

 <trans-unit id="Inline_temporary_variable"> 
   <source>Inline temporary variable</source> 
-  <target state="translated">Встроенная временная переменная</target>
+  <target state="translated">Встроить временную переменную</target> 
-  <note />
+  <note>"Inline" is a verb here</note>
 </trans-unit> 

Also as a side note: maybe it is better to move this localization string to a shared layer rather than having standalone duplicates for C# and VB?

@JoeRobich This kind of issues is handled by you, right?

JoeRobich commented 2 years ago

@JoeRobich This kind of issues is handled by you, right?

Yeah... I really need to document this so others know the process. =)

Reported internally as https://ceapex.visualstudio.com/CEINTL/_workitems/edit/656035 (microsoft)

JoeRobich commented 2 years ago

The internal issue has been resolved. The change will be part of a future localization update.

CyrusNajmabadi commented 3 weeks ago

Closing as this was resolved.