Skip to content

Commit

Permalink
Test to prevent icons from being duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Aug 27, 2023
1 parent b916779 commit 62409cf
Show file tree
Hide file tree
Showing 30 changed files with 168 additions and 77 deletions.
2 changes: 1 addition & 1 deletion AutoUpdate/SingleAssemblyResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override ResourceSet InternalGetResourceSet(CultureInfo culture,
bool createIfNotExists, bool tryParents)
{
ResourceSet rs;
if (!myResourceSets.TryGetValue(culture, out rs))
if (!myResourceSets.TryGetValue(culture, out rs) && createIfNotExists)
{
// Lazy-load default language (without caring about duplicate assignment in race conditions, no harm done)
if (neutralResourcesCulture == null)
Expand Down
2 changes: 1 addition & 1 deletion Cmdline/SingleAssemblyResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override ResourceSet InternalGetResourceSet(CultureInfo culture,
bool createIfNotExists, bool tryParents)
{
ResourceSet rs;
if (!myResourceSets.TryGetValue(culture, out rs))
if (!myResourceSets.TryGetValue(culture, out rs) && createIfNotExists)
{
// Lazy-load default language (without caring about duplicate assignment in race conditions, no harm done)
if (neutralResourcesCulture == null)
Expand Down
2 changes: 1 addition & 1 deletion ConsoleUI/SingleAssemblyResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override ResourceSet InternalGetResourceSet(CultureInfo culture,
bool createIfNotExists, bool tryParents)
{
ResourceSet rs;
if (!myResourceSets.TryGetValue(culture, out rs))
if (!myResourceSets.TryGetValue(culture, out rs) && createIfNotExists)
{
// Lazy-load default language (without caring about duplicate assignment in race conditions, no harm done)
if (neutralResourcesCulture == null)
Expand Down
2 changes: 1 addition & 1 deletion Core/SingleAssemblyResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override ResourceSet InternalGetResourceSet(CultureInfo culture,
bool createIfNotExists, bool tryParents)
{
ResourceSet rs;
if (!myResourceSets.TryGetValue(culture, out rs))
if (!myResourceSets.TryGetValue(culture, out rs) && createIfNotExists)
{
// Lazy-load default language (without caring about duplicate assignment in race conditions, no harm done)
if (neutralResourcesCulture == null)
Expand Down
6 changes: 6 additions & 0 deletions GUI/CKAN-GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,12 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.tr-TR.resx">
<LogicalName>CKAN.GUI.Properties.Resources.tr-TR.resources</LogicalName>
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Dialogs\RenameInstanceDialog.resx">
<DependentUpon>RenameInstanceDialog.cs</DependentUpon>
</EmbeddedResource>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Controls/ManageMods.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve"><value>Launch Game</value></data>
<data name="RefreshToolButton.Text" xml:space="preserve"><value>Refresh</value></data>
<data name="UpdateAllToolButton.Text" xml:space="preserve"><value>Add available updates</value></data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/de-DE/Main.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve"><value>Datei</value></data>
<data name="manageGameInstancesMenuItem.Text" xml:space="preserve"><value>Spielinstanzen verwalten</value></data>
<data name="openGameDirectoryToolStripMenuItem.Text" xml:space="preserve"><value>Spieleverzeichnis öffnen</value></data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/de-DE/ManageMods.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve"><value>Spiel starten</value></data>
<data name="RefreshToolButton.Text" xml:space="preserve"><value>Aktualisieren</value></data>
<data name="UpdateAllToolButton.Text" xml:space="preserve"><value>Verfügbare Updates auswählen</value></data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/fr-FR/Main.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;Fichier</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/fr-FR/ManageMods.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>Lancer le Jeu</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/it-IT/Main.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;File</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/it-IT/ManageMods.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>Avvia Gioco</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/ja-JP/Main.ja-JP.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve"><value>ファイル</value></data>
<data name="manageGameInstancesMenuItem.Text" xml:space="preserve"><value>インスタンスを管理</value></data>
<data name="openGameDirectoryToolStripMenuItem.Text" xml:space="preserve"><value>ゲームファイルの場所を開く</value></data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/ja-JP/ManageMods.ja-JP.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>ゲームを起動</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/ko-KR/Main.ko-KR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>파일</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/ko-KR/ManageMods.ko-KR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>게임 실행</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/pl-PL/Main.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;Plik</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/pl-PL/ManageMods.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>Uruchom grę</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/pt-BR/Main.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>Arquivo</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/pt-BR/ManageMods.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>Abrir Jogo</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/ru-RU/Main.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;Файл</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/ru-RU/ManageMods.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve">
<value>Запустить игру</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/zh-CN/EditModSearch.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,5 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="FilterCombinedLabel.Text" xml:space="preserve"><value>搜索:</value></data>
</root>
3 changes: 0 additions & 3 deletions GUI/Localization/zh-CN/Main.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve"><value>文件</value></data>
<data name="manageGameInstancesMenuItem.Text" xml:space="preserve"><value>管理游戏实例</value></data>
<data name="openGameDirectoryToolStripMenuItem.Text" xml:space="preserve"><value>打开游戏目录</value></data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Localization/zh-CN/ManageMods.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="launchGameToolStripMenuItem.Text" xml:space="preserve"><value>启动游戏</value></data>
<data name="RefreshToolButton.Text" xml:space="preserve"><value>刷新</value></data>
<data name="UpdateAllToolButton.Text" xml:space="preserve"><value>添加可用更新</value></data>
Expand Down
3 changes: 0 additions & 3 deletions GUI/Main/Main.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve"><value>&amp;File</value></data>
<data name="manageGameInstancesMenuItem.Text" xml:space="preserve"><value>&amp;Manage game instances</value></data>
<data name="openGameDirectoryToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Open game directory</value></data>
Expand Down
120 changes: 120 additions & 0 deletions GUI/Properties/Resources.tr-TR.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
2 changes: 1 addition & 1 deletion GUI/SingleAssemblyComponentResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected override ResourceSet InternalGetResourceSet(CultureInfo culture,
bool createIfNotExists, bool tryParents)
{
ResourceSet rs;
if (!myResourceSets.TryGetValue(culture, out rs))
if (!myResourceSets.TryGetValue(culture, out rs) && createIfNotExists)
{
// Lazy-load default language (without caring about duplicate assignment in race conditions, no harm done)
if (neutralResourcesCulture == null)
Expand Down
2 changes: 1 addition & 1 deletion GUI/SingleAssemblyResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override ResourceSet InternalGetResourceSet(CultureInfo culture,
bool createIfNotExists, bool tryParents)
{
ResourceSet rs;
if (!myResourceSets.TryGetValue(culture, out rs))
if (!myResourceSets.TryGetValue(culture, out rs) && createIfNotExists)
{
// Lazy-load default language (without caring about duplicate assignment in race conditions, no harm done)
if (neutralResourcesCulture == null)
Expand Down
Loading

0 comments on commit 62409cf

Please sign in to comment.