Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
69e9c10b
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
69e9c10b
编写于
2月 28, 2016
作者:
B
Balaji Krishnan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Localize strings.
上级
77319f1a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
145 addition
and
16 deletion
+145
-16
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
+81
-0
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
+27
-0
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
...alStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
+10
-12
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
+18
-0
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+6
-0
src/VisualStudio/Core/Impl/Options/AbstractCodeStyleOptionViewModel.cs
...dio/Core/Impl/Options/AbstractCodeStyleOptionViewModel.cs
+3
-4
未找到文件。
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
浏览文件 @
69e9c10b
...
...
@@ -105,6 +105,15 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Do not prefer 'this.'.
/// </summary>
internal
static
string
DoNotPreferThis
{
get
{
return
ResourceManager
.
GetString
(
"DoNotPreferThis"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Place "else" on new line.
/// </summary>
...
...
@@ -618,6 +627,33 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to predefined type preferences:.
/// </summary>
internal
static
string
PredefinedTypesGroupTitle
{
get
{
return
ResourceManager
.
GetString
(
"PredefinedTypesGroupTitle"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Prefer explicit type.
/// </summary>
internal
static
string
PreferExplicitType
{
get
{
return
ResourceManager
.
GetString
(
"PreferExplicitType"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Prefer framework type.
/// </summary>
internal
static
string
PreferFrameworkType
{
get
{
return
ResourceManager
.
GetString
(
"PreferFrameworkType"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to For locals, parameters and members.
/// </summary>
...
...
@@ -636,6 +672,33 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Prefer predefined type.
/// </summary>
internal
static
string
PreferPredefinedType
{
get
{
return
ResourceManager
.
GetString
(
"PreferPredefinedType"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Prefer 'this.'.
/// </summary>
internal
static
string
PreferThis
{
get
{
return
ResourceManager
.
GetString
(
"PreferThis"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Prefer 'var'.
/// </summary>
internal
static
string
PreferVar
{
get
{
return
ResourceManager
.
GetString
(
"PreferVar"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Qualify event access with 'this'.
/// </summary>
...
...
@@ -654,6 +717,15 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to 'this.' preferences:.
/// </summary>
internal
static
string
QualifyGroupTitle
{
get
{
return
ResourceManager
.
GetString
(
"QualifyGroupTitle"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Qualify method access with 'this'.
/// </summary>
...
...
@@ -987,6 +1059,15 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to 'var' preferences:.
/// </summary>
internal
static
string
VarGroupTitle
{
get
{
return
ResourceManager
.
GetString
(
"VarGroupTitle"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Leave statements and member declarations on the same line.
/// </summary>
...
...
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
浏览文件 @
69e9c10b
...
...
@@ -432,4 +432,31 @@
<data
name=
"QualifyPropertyAccessWithThis"
xml:space=
"preserve"
>
<value>
Qualify property access with 'this'
</value>
</data>
<data
name=
"PreferExplicitType"
xml:space=
"preserve"
>
<value>
Prefer explicit type
</value>
</data>
<data
name=
"PreferFrameworkType"
xml:space=
"preserve"
>
<value>
Prefer framework type
</value>
</data>
<data
name=
"PreferPredefinedType"
xml:space=
"preserve"
>
<value>
Prefer predefined type
</value>
</data>
<data
name=
"PreferThis"
xml:space=
"preserve"
>
<value>
Prefer 'this.'
</value>
</data>
<data
name=
"PreferVar"
xml:space=
"preserve"
>
<value>
Prefer 'var'
</value>
</data>
<data
name=
"QualifyGroupTitle"
xml:space=
"preserve"
>
<value>
'this.' preferences:
</value>
</data>
<data
name=
"VarGroupTitle"
xml:space=
"preserve"
>
<value>
'var' preferences:
</value>
</data>
<data
name=
"DoNotPreferThis"
xml:space=
"preserve"
>
<value>
Do not prefer 'this.'
</value>
</data>
<data
name=
"PredefinedTypesGroupTitle"
xml:space=
"preserve"
>
<value>
predefined type preferences:
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
浏览文件 @
69e9c10b
...
...
@@ -170,31 +170,29 @@ internal StyleViewModel(OptionSet optionSet, IServiceProvider serviceProvider) :
{
CodeStyleItems
=
new
ObservableCollection
<
AbstractCodeStyleOptionViewModel
>();
ListCollectionView
collectionView
=
(
ListCollectionView
)
CollectionViewSource
.
GetDefaultView
(
CodeStyleItems
);
var
collectionView
=
(
ListCollectionView
)
CollectionViewSource
.
GetDefaultView
(
CodeStyleItems
);
collectionView
.
GroupDescriptions
.
Add
(
new
PropertyGroupDescription
(
nameof
(
AbstractCodeStyleOptionViewModel
.
GroupName
)));
// TODO: move all strings from here to resx for loc.
const
string
qualifyGroupTitle
=
"this. preferences:"
;
const
string
predefinedTypesGroupTitle
=
"predefined type preferences:"
;
const
string
varGroupTitle
=
"'var' preferences:"
;
var
qualifyGroupTitle
=
CSharpVSResources
.
QualifyGroupTitle
;
var
predefinedTypesGroupTitle
=
CSharpVSResources
.
PredefinedTypesGroupTitle
;
var
varGroupTitle
=
CSharpVSResources
.
VarGroupTitle
;
var
qualifyMemberAccessPreferences
=
new
List
<
CodeStylePreference
>
{
new
CodeStylePreference
(
"Prefer this."
,
true
),
new
CodeStylePreference
(
"Do not prefer this."
,
false
),
new
CodeStylePreference
(
CSharpVSResources
.
PreferThis
,
isChecked
:
true
),
new
CodeStylePreference
(
CSharpVSResources
.
DoNotPreferThis
,
isChecked
:
false
),
};
var
predefinedTypesPreferences
=
new
List
<
CodeStylePreference
>
{
new
CodeStylePreference
(
"Prefer predefined type"
,
true
),
new
CodeStylePreference
(
"Prefer framework type"
,
false
),
new
CodeStylePreference
(
CSharpVSResources
.
PreferPredefinedType
,
isChecked
:
true
),
new
CodeStylePreference
(
CSharpVSResources
.
PreferFrameworkType
,
isChecked
:
false
),
};
var
useVarPreferences
=
new
List
<
CodeStylePreference
>
{
new
CodeStylePreference
(
"Prefer 'var'"
,
true
),
new
CodeStylePreference
(
"Prefer explicit type"
,
false
),
new
CodeStylePreference
(
CSharpVSResources
.
PreferVar
,
isChecked
:
true
),
new
CodeStylePreference
(
CSharpVSResources
.
PreferExplicitType
,
isChecked
:
false
),
};
CodeStyleItems
.
Add
(
new
BooleanCodeStyleOptionViewModel
(
SimplificationOptions
.
QualifyMemberAccessWithThisOrMe
,
CSharpVSResources
.
QualifyMemberAccessWithThis
,
s_declarationPreviewTrue
,
s_declarationPreviewFalse
,
this
,
optionSet
,
qualifyGroupTitle
,
qualifyMemberAccessPreferences
));
...
...
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
浏览文件 @
69e9c10b
...
...
@@ -764,6 +764,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to No.
/// </summary>
internal
static
string
No
{
get
{
return
ResourceManager
.
GetString
(
"No"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to No Changes.
/// </summary>
...
...
@@ -1227,6 +1236,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Yes.
/// </summary>
internal
static
string
Yes
{
get
{
return
ResourceManager
.
GetString
(
"Yes"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to You must select at least one member..
/// </summary>
...
...
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
69e9c10b
...
...
@@ -513,4 +513,10 @@ Use the dropdown to view and switch to other projects this file may belong to.</
<data
name=
"Unknown"
xml:space=
"preserve"
>
<value>
<
Unknown
>
</value>
</data>
<data
name=
"No"
xml:space=
"preserve"
>
<value>
No
</value>
</data>
<data
name=
"Yes"
xml:space=
"preserve"
>
<value>
Yes
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/Core/Impl/Options/AbstractCodeStyleOptionViewModel.cs
浏览文件 @
69e9c10b
...
...
@@ -37,7 +37,7 @@ internal abstract class AbstractCodeStyleOptionViewModel : AbstractNotifyPropert
public
List
<
NotificationOptionViewModel
>
NotificationPreferences
{
get
;
set
;
}
public
abstract
bool
NotificationsAvailable
{
get
;
}
public
virtual
string
GetPreview
()
=>
SelectedPreference
.
IsChecked
?
_truePreview
:
_falsePreview
;
public
virtual
string
GetPreview
()
=>
SelectedPreference
.
IsChecked
?
_truePreview
:
_falsePreview
;
public
AbstractCodeStyleOptionViewModel
(
IOption
option
,
...
...
@@ -77,9 +77,8 @@ private static List<CodeStylePreference> GetDefaultPreferences()
{
return
new
List
<
CodeStylePreference
>
{
// TODO: move to resx for loc.
new
CodeStylePreference
(
"Yes"
,
true
),
new
CodeStylePreference
(
"No"
,
false
),
new
CodeStylePreference
(
ServicesVSResources
.
Yes
,
isChecked
:
true
),
new
CodeStylePreference
(
ServicesVSResources
.
No
,
isChecked
:
false
),
};
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录