fix
This commit is contained in:
parent
ebb0be38d9
commit
865b5ff4f4
10 changed files with 43 additions and 29 deletions
|
|
@ -12,17 +12,17 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
ProductName = "Telesrv"
|
||||
ProductUsername = "telesrv"
|
||||
DesktopAppName = "Telesrv Desktop"
|
||||
AndroidAppName = "Telesrv Android"
|
||||
IOSAppName = "Telesrv iOS"
|
||||
MacOSAppName = "Telesrv macOS"
|
||||
WebAAppName = "Telesrv Web A"
|
||||
WebKAppName = "Telesrv Web K"
|
||||
PremiumName = "Telesrv Premium"
|
||||
StarsName = "Telesrv Stars"
|
||||
DefaultPublicURL = "https://telesrv.net"
|
||||
ProductName = "OwpenGram"
|
||||
ProductUsername = "owpengram"
|
||||
DesktopAppName = "OwpenGram Desktop"
|
||||
AndroidAppName = "OwpenGram Android"
|
||||
IOSAppName = "OwpenGram iOS"
|
||||
MacOSAppName = "OwpenGram macOS"
|
||||
WebAAppName = "OwpenGram Web A"
|
||||
WebKAppName = "OwpenGram Web K"
|
||||
PremiumName = "OwpenGram Premium"
|
||||
StarsName = "OwpenGram Stars"
|
||||
DefaultPublicURL = "https://owpengram.org"
|
||||
)
|
||||
|
||||
// ClientAppName returns the branded display name for a stored client platform.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ func TestUserVisibleTextRebrandsWordsAndOfficialHosts(t *testing.T) {
|
|||
"Telegram telegram TELEGRAM Telegram-like https://translations.telegram.org/en t.me/example desktop.telegram.org",
|
||||
"https://chat.example/root/",
|
||||
)
|
||||
want := "Telesrv Telesrv Telesrv Telesrv-like https://chat.example/root/en chat.example/example chat.example"
|
||||
want := "OwpenGram OwpenGram OwpenGram OwpenGram-like https://chat.example/root/en chat.example/example chat.example"
|
||||
if got != want {
|
||||
t.Fatalf("UserVisibleText() = %q, want %q", got, want)
|
||||
}
|
||||
|
|
@ -27,9 +27,9 @@ func TestUserVisibleTextPreservesTechnicalIdentifiers(t *testing.T) {
|
|||
|
||||
func TestUserVisibleTextRebrandsBareOfficialHostsWithoutTouchingDottedIdentifiers(t *testing.T) {
|
||||
for input, want := range map[string]string{
|
||||
"telegram.org": "telesrv.net",
|
||||
"desktop.telegram.org": "telesrv.net",
|
||||
"t.me/example": "telesrv.net/example",
|
||||
"telegram.org": "owpengram.org",
|
||||
"desktop.telegram.org": "owpengram.org",
|
||||
"t.me/example": "owpengram.org/example",
|
||||
"org.telegram.messenger": "org.telegram.messenger",
|
||||
} {
|
||||
if got := UserVisibleText(input, ""); got != want {
|
||||
|
|
@ -40,7 +40,7 @@ func TestUserVisibleTextRebrandsBareOfficialHostsWithoutTouchingDottedIdentifier
|
|||
|
||||
func TestUserVisibleTextRebrandsLocalizedProductNames(t *testing.T) {
|
||||
got := UserVisibleText("Телеграмом تيليجرام تلگرام 텔레그램 טלגרם", "")
|
||||
if want := "Telesrv Telesrv Telesrv Telesrv Telesrv"; got != want {
|
||||
if want := "OwpenGram OwpenGram OwpenGram OwpenGram OwpenGram"; got != want {
|
||||
t.Fatalf("UserVisibleText() = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue