Skip to content

Commit bae916c

Browse files
committed
Use Pinta's translations for the effect category
Since this is one of the factory category names, use Pinta's translations so it is correctly translated for all languages (rather than requiring it to be translated again for every language for this add-in) Related to PintaProject/Pinta#1933
1 parent 12a81c9 commit bae916c

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

NightVisionAddin/NightVisionEffect.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
//
1+
//
22
// NightVisionEffect.cs
3-
//
3+
//
44
// Author:
55
// Robert Nordan <rpvn@robpvn.net>
6-
//
6+
//
77
// Copyright (c) 2013 Robert Nordan
8-
//
8+
//
99
// Permission is hereby granted, free of charge, to any person obtaining a copy
1010
// of this software and associated documentation files (the "Software"), to deal
1111
// in the Software without restriction, including without limitation the rights
1212
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1313
// copies of the Software, and to permit persons to whom the Software is
1414
// furnished to do so, subject to the following conditions:
15-
//
15+
//
1616
// The above copyright notice and this permission notice shall be included in
1717
// all copies or substantial portions of the Software.
18-
//
18+
//
1919
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2020
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2121
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -47,8 +47,9 @@ internal NightVisionEffect (IServiceProvider services)
4747
public override string Name
4848
=> AddinManager.CurrentLocalizer.GetString ("Night Vision");
4949

50+
// Note we use Pinta's translations here, not our add-in's, since this is a standard category name.
5051
public override string EffectMenuCategory
51-
=> AddinManager.CurrentLocalizer.GetString ("Stylize");
52+
=> Pinta.Core.Translations.GetString ("Stylize");
5253

5354
//TODO: Pull in other effects like noise and soften to make it even more nightvision-y
5455

NightVisionAddin/Resources/Language.resx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120-
<data name="Stylize" xml:space="preserve">
121-
<value>Stylize</value>
122-
<comment/>
123-
</data>
124120
<data name="Night Vision" xml:space="preserve">
125121
<value>Night Vision</value>
126122
<comment/>
@@ -141,4 +137,4 @@
141137
<value>A simple add-in that will recolor your image so that it looks like a night vision picture.</value>
142138
<comment/>
143139
</data>
144-
</root>
140+
</root>

0 commit comments

Comments
 (0)