mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
I18n
This commit is contained in:
parent
90bc0e98ed
commit
b4082ec1ec
1 changed files with 11 additions and 4 deletions
|
|
@ -1163,15 +1163,22 @@ public static class ConfigHandler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string PolicyGroupDefaultAllFilter = "^(?!.*(?:剩余|过期|到期|重置)).*$";
|
// Matches subscription-info noise words in both Chinese and English.
|
||||||
|
// Chinese: 剩余(remaining), 过期/到期(expired/expiry), 重置(reset)
|
||||||
|
// English: remaining, expir(e/ed/y), reset
|
||||||
|
private const string PolicyGroupExcludeKeywords = @"剩余|过期|到期|重置|[Rr]emaining|[Ee]xpir|[Rr]eset";
|
||||||
|
|
||||||
|
private const string PolicyGroupDefaultAllFilter = $"^(?!.*(?:{PolicyGroupExcludeKeywords})).*$";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Combines a region pattern with PolicyGroupDefaultAllFilter so results must
|
/// Combines a region pattern with PolicyGroupDefaultAllFilter so results must
|
||||||
/// match the region keyword AND not contain expiry/traffic noise words.
|
/// match the region keyword AND not contain expiry/traffic noise words (CN + EN).
|
||||||
/// Result pattern: ^(?!.*(?:剩余|过期|到期|重置)).*(?:regionPattern).*$
|
/// Result pattern: ^(?!.*(?:...excludeKeywords...)).*(?:regionPattern).*$
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static string CombineWithDefaultAllFilter(string regionPattern)
|
private static string CombineWithDefaultAllFilter(string regionPattern)
|
||||||
=> $"^(?!.*(?:剩余|过期|到期|重置)).*(?:{regionPattern}).*$";
|
{
|
||||||
|
return $"^(?!.*(?:{PolicyGroupExcludeKeywords})).*(?:{regionPattern}).*$";
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a group server that combines multiple servers for load balancing
|
/// Create a group server that combines multiple servers for load balancing
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue