2020-04-21 14:37:50 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2021-06-16 14:58:07 +08:00
|
|
|
using System;
|
|
|
|
using osu.Framework.Localisation;
|
2021-01-28 05:01:56 +08:00
|
|
|
using osu.Framework.Utils;
|
2021-06-16 14:58:07 +08:00
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2020-04-21 14:37:50 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Overlays.BeatmapListing
|
|
|
|
{
|
2021-06-16 14:58:07 +08:00
|
|
|
[LocalisableEnum(typeof(SearchLanguageEnumLocalisationMapper))]
|
2020-04-21 14:37:50 +08:00
|
|
|
[HasOrderedElements]
|
|
|
|
public enum SearchLanguage
|
|
|
|
{
|
|
|
|
[Order(0)]
|
|
|
|
Any,
|
|
|
|
|
2020-06-15 17:45:50 +08:00
|
|
|
[Order(14)]
|
|
|
|
Unspecified,
|
2020-04-21 14:37:50 +08:00
|
|
|
|
|
|
|
[Order(1)]
|
|
|
|
English,
|
|
|
|
|
|
|
|
[Order(6)]
|
|
|
|
Japanese,
|
|
|
|
|
|
|
|
[Order(2)]
|
|
|
|
Chinese,
|
|
|
|
|
2020-06-13 14:48:30 +08:00
|
|
|
[Order(12)]
|
2020-04-21 14:37:50 +08:00
|
|
|
Instrumental,
|
|
|
|
|
|
|
|
[Order(7)]
|
|
|
|
Korean,
|
|
|
|
|
|
|
|
[Order(3)]
|
|
|
|
French,
|
|
|
|
|
|
|
|
[Order(4)]
|
|
|
|
German,
|
|
|
|
|
|
|
|
[Order(9)]
|
|
|
|
Swedish,
|
|
|
|
|
|
|
|
[Order(8)]
|
|
|
|
Spanish,
|
|
|
|
|
|
|
|
[Order(5)]
|
2020-06-13 14:48:30 +08:00
|
|
|
Italian,
|
|
|
|
|
|
|
|
[Order(10)]
|
|
|
|
Russian,
|
|
|
|
|
|
|
|
[Order(11)]
|
2020-06-13 15:20:34 +08:00
|
|
|
Polish,
|
|
|
|
|
2020-06-15 17:45:50 +08:00
|
|
|
[Order(13)]
|
|
|
|
Other
|
2020-04-21 14:37:50 +08:00
|
|
|
}
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
|
|
public class SearchLanguageEnumLocalisationMapper : EnumLocalisationMapper<SearchLanguage>
|
|
|
|
{
|
|
|
|
public override LocalisableString Map(SearchLanguage value)
|
|
|
|
{
|
|
|
|
switch (value)
|
|
|
|
{
|
|
|
|
case SearchLanguage.Any:
|
|
|
|
return BeatmapsStrings.LanguageAny;
|
|
|
|
|
|
|
|
case SearchLanguage.Unspecified:
|
|
|
|
return BeatmapsStrings.LanguageUnspecified;
|
|
|
|
|
|
|
|
case SearchLanguage.English:
|
|
|
|
return BeatmapsStrings.LanguageEnglish;
|
|
|
|
|
|
|
|
case SearchLanguage.Japanese:
|
|
|
|
return BeatmapsStrings.LanguageJapanese;
|
|
|
|
|
|
|
|
case SearchLanguage.Chinese:
|
|
|
|
return BeatmapsStrings.LanguageChinese;
|
|
|
|
|
|
|
|
case SearchLanguage.Instrumental:
|
|
|
|
return BeatmapsStrings.LanguageInstrumental;
|
|
|
|
|
|
|
|
case SearchLanguage.Korean:
|
|
|
|
return BeatmapsStrings.LanguageKorean;
|
|
|
|
|
|
|
|
case SearchLanguage.French:
|
|
|
|
return BeatmapsStrings.LanguageFrench;
|
|
|
|
|
|
|
|
case SearchLanguage.German:
|
|
|
|
return BeatmapsStrings.LanguageGerman;
|
|
|
|
|
|
|
|
case SearchLanguage.Swedish:
|
|
|
|
return BeatmapsStrings.LanguageSwedish;
|
|
|
|
|
|
|
|
case SearchLanguage.Spanish:
|
|
|
|
return BeatmapsStrings.LanguageSpanish;
|
|
|
|
|
|
|
|
case SearchLanguage.Italian:
|
|
|
|
return BeatmapsStrings.LanguageItalian;
|
|
|
|
|
|
|
|
case SearchLanguage.Russian:
|
|
|
|
return BeatmapsStrings.LanguageRussian;
|
|
|
|
|
|
|
|
case SearchLanguage.Polish:
|
|
|
|
return BeatmapsStrings.LanguagePolish;
|
|
|
|
|
|
|
|
case SearchLanguage.Other:
|
2021-06-16 19:27:02 +08:00
|
|
|
return BeatmapsStrings.LanguageOther;
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
|
|
default:
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(value), value, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-21 14:37:50 +08:00
|
|
|
}
|