From 281e29a0cfda3dc2f73b49702d3e6a48c46aa772 Mon Sep 17 00:00:00 2001 From: Kyujin Cho Date: Tue, 31 Oct 2023 21:46:56 -0700 Subject: [PATCH] fix: limit number of characters of model service name (#2003) * fix: sevice session fails to create when service name is long enough * remove unrelated changes --- react/src/components/ServiceLauncherModal.tsx | 2 +- resources/i18n/de.json | 2 +- resources/i18n/el.json | 2 +- resources/i18n/en.json | 2 +- resources/i18n/es.json | 2 +- resources/i18n/fi.json | 2 +- resources/i18n/fr.json | 2 +- resources/i18n/id.json | 2 +- resources/i18n/it.json | 2 +- resources/i18n/ja.json | 2 +- resources/i18n/ko.json | 2 +- resources/i18n/mn.json | 2 +- resources/i18n/ms.json | 2 +- resources/i18n/pl.json | 2 +- resources/i18n/pt-BR.json | 2 +- resources/i18n/pt.json | 2 +- resources/i18n/ru.json | 2 +- resources/i18n/tr.json | 2 +- resources/i18n/vi.json | 2 +- resources/i18n/zh-CN.json | 2 +- resources/i18n/zh-TW.json | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/react/src/components/ServiceLauncherModal.tsx b/react/src/components/ServiceLauncherModal.tsx index d6617ae020..40397073d2 100644 --- a/react/src/components/ServiceLauncherModal.tsx +++ b/react/src/components/ServiceLauncherModal.tsx @@ -218,7 +218,7 @@ const ServiceLauncherModal: React.FC = ({ name="serviceName" rules={[ { - pattern: /^(?=.{4,64}$)\w[\w.-]*\w$/, + pattern: /^(?=.{4,24}$)\w[\w.-]*\w$/, message: t('modelService.ServiceNameRule'), }, { diff --git a/resources/i18n/de.json b/resources/i18n/de.json index 2fe3904bfb..3b5d8421c2 100644 --- a/resources/i18n/de.json +++ b/resources/i18n/de.json @@ -1337,7 +1337,7 @@ "FormValidationFailed": "Formularüberprüfung fehlgeschlagen", "StartNewServing": "Neue Portion starten", "ServiceName": "Dienst Name", - "ServiceNameRule": "Erlaubt sind nur 4 bis 64 alphanumerische Zeichen, Unterstrich(_), Bindestrich(-) und Punkt(.) und er muss mit einem alphanumerischen Zeichen enden.", + "ServiceNameRule": "Erlaubt sind nur 4 bis 24 alphanumerische Zeichen, Unterstrich(_), Bindestrich(-) und Punkt(.) und er muss mit einem alphanumerischen Zeichen enden.", "OpenToPublic": "Offen für die Öffentlichkeit", "DesiredRoutingCount": "Gewünschte Routinganzahl", "ServingRouteErrorModalTitle": "Serving Route Fehler", diff --git a/resources/i18n/el.json b/resources/i18n/el.json index f245c0205f..49c0949796 100644 --- a/resources/i18n/el.json +++ b/resources/i18n/el.json @@ -1337,7 +1337,7 @@ "FormValidationFailed": "Η επικύρωση της φόρμας απέτυχε", "StartNewServing": "Έναρξη νέου σερβιρίσματος", "ServiceName": "Όνομα υπηρεσίας", - "ServiceNameRule": "Επιτρέπονται μόνο 4 έως 64 αλφαριθμητικοί χαρακτήρες, υπογράμμιση(_), παύλα(-) και τελεία(.) και πρέπει να τελειώνουν με έναν αλφαριθμητικό χαρακτήρα.", + "ServiceNameRule": "Επιτρέπονται μόνο 4 έως 24 αλφαριθμητικοί χαρακτήρες, υπογράμμιση(_), παύλα(-) και τελεία(.) και πρέπει να τελειώνουν με έναν αλφαριθμητικό χαρακτήρα.", "OpenToPublic": "Ανοιχτό για το κοινό", "DesiredRoutingCount": "Επιθυμητός αριθμός δρομολόγησης", "ServingRouteErrorModalTitle": "Σφάλμα διαδρομής εξυπηρέτησης", diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 739f871b0f..feabbe3f00 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -410,7 +410,7 @@ "ExpiredDate": "Expired Date", "TokenExpiredDateHelp": "The default token expiration time is 24 hours later.", "TokenExpiredDateError": "The token expiration time must be after the current time", - "ServiceNameRule": "Only allow 4 to 64 characters of alphanumeric, underscore(_), hyphen(-), and period(.) and it must end with an alphanumeric character.", + "ServiceNameRule": "Only allow 4 to 24 characters of alphanumeric, underscore(_), hyphen(-), and period(.) and it must end with an alphanumeric character.", "FormValidationFailed": "Form validation failed", "resources": "Resources", "Image": "Image" diff --git a/resources/i18n/es.json b/resources/i18n/es.json index 51086e401f..e0402b83d2 100644 --- a/resources/i18n/es.json +++ b/resources/i18n/es.json @@ -692,7 +692,7 @@ "ServiceEndpoint": "Punto final del servicio", "ServiceInfo": "Información de servicio", "ServiceName": "Nombre del servicio", - "ServiceNameRule": "Sólo se permiten de 4 a 64 caracteres alfanuméricos, guión bajo(_), guión(-) y punto(.) y debe terminar con un carácter alfanumérico.", + "ServiceNameRule": "Sólo se permiten de 4 a 24 caracteres alfanuméricos, guión bajo(_), guión(-) y punto(.) y debe terminar con un carácter alfanumérico.", "Services": "Servicios", "ServingRouteErrorModalTitle": "Error de ruta de servicio", "SessionId": "ID de sesión", diff --git a/resources/i18n/fi.json b/resources/i18n/fi.json index 7715ff2279..ed98ed3774 100644 --- a/resources/i18n/fi.json +++ b/resources/i18n/fi.json @@ -692,7 +692,7 @@ "ServiceEndpoint": "Palvelun päätepiste", "ServiceInfo": "Palvelun tiedot", "ServiceName": "Palvelun nimi", - "ServiceNameRule": "Ainoastaan aakkosnumeerisia merkkejä, alaviivoja(_), väliviivoja(-) ja pisteitä(.) saa olla 4-64 merkkiä, ja sen on päätyttävä aakkosnumeeriseen merkkiin.", + "ServiceNameRule": "Ainoastaan aakkosnumeerisia merkkejä, alaviivoja(_), väliviivoja(-) ja pisteitä(.) saa olla 4-24 merkkiä, ja sen on päätyttävä aakkosnumeeriseen merkkiin.", "Services": "Palvelut", "ServingRouteErrorModalTitle": "Palvelevan reitin virhe", "SessionId": "Istunnon ID", diff --git a/resources/i18n/fr.json b/resources/i18n/fr.json index 286912529e..eafa2d43bc 100644 --- a/resources/i18n/fr.json +++ b/resources/i18n/fr.json @@ -1412,7 +1412,7 @@ "TokenExpiredDateHelp": "Le délai d'expiration par défaut du jeton est de 24 heures.", "TokenExpiredDateError": "L'heure d'expiration du jeton doit être postérieure à l'heure actuelle.", "FormValidationFailed": "La validation du formulaire a échoué", - "ServiceNameRule": "Seuls 4 à 64 caractères alphanumériques, le trait de soulignement (_), le trait d'union (-) et le point (.) sont autorisés et le texte doit se terminer par un caractère alphanumérique.", + "ServiceNameRule": "Seuls 4 à 24 caractères alphanumériques, le trait de soulignement (_), le trait d'union (-) et le point (.) sont autorisés et le texte doit se terminer par un caractère alphanumérique.", "resources": "Ressources", "Image": "Image" }, diff --git a/resources/i18n/id.json b/resources/i18n/id.json index b5b6a22961..5ee9b368ef 100644 --- a/resources/i18n/id.json +++ b/resources/i18n/id.json @@ -1412,7 +1412,7 @@ "TokenExpiredDateHelp": "Waktu kedaluwarsa token default adalah 24 jam kemudian.", "TokenExpiredDateError": "Waktu kedaluwarsa token harus setelah waktu saat ini", "FormValidationFailed": "Validasi formulir gagal", - "ServiceNameRule": "Hanya mengizinkan 4 hingga 64 karakter alfanumerik, garis bawah (_), tanda hubung (-), dan titik (.) dan harus diakhiri dengan karakter alfanumerik.", + "ServiceNameRule": "Hanya mengizinkan 4 hingga 24 karakter alfanumerik, garis bawah (_), tanda hubung (-), dan titik (.) dan harus diakhiri dengan karakter alfanumerik.", "resources": "Sumber daya", "Image": "Gambar" }, diff --git a/resources/i18n/it.json b/resources/i18n/it.json index 64628a10ea..186d83757f 100644 --- a/resources/i18n/it.json +++ b/resources/i18n/it.json @@ -1337,7 +1337,7 @@ "FormValidationFailed": "Convalida del modulo non riuscita", "StartNewServing": "Iniziare un nuovo servizio", "ServiceName": "Nome del servizio", - "ServiceNameRule": "Sono consentiti solo da 4 a 64 caratteri alfanumerici, underscore(_), trattino(-) e punto(.) e devono terminare con un carattere alfanumerico.", + "ServiceNameRule": "Sono consentiti solo da 4 a 24 caratteri alfanumerici, underscore(_), trattino(-) e punto(.) e devono terminare con un carattere alfanumerico.", "OpenToPublic": "Aperto al pubblico", "DesiredRoutingCount": "Conteggio dell'instradamento desiderato", "ServingRouteErrorModalTitle": "Errore del percorso di servizio", diff --git a/resources/i18n/ja.json b/resources/i18n/ja.json index 335f198959..11dc9c9931 100644 --- a/resources/i18n/ja.json +++ b/resources/i18n/ja.json @@ -1337,7 +1337,7 @@ "FormValidationFailed": "フォーム検証の失敗", "StartNewServing": "新サービス開始", "ServiceName": "サービス名", - "ServiceNameRule": "4~64文字の英字、数字、アンダーライン(_)、ハイフン(-)、ピリオド(.)のみを許可し、英文で英字または数字で終わる必要があります。", + "ServiceNameRule": "4~24文字の英字、数字、アンダーライン(_)、ハイフン(-)、ピリオド(.)のみを許可し、英文で英字または数字で終わる必要があります。", "OpenToPublic": "アプリを外部に公開", "DesiredRoutingCount": "希望のルーティング数", "ServingRouteErrorModalTitle": "サービングルートエラー", diff --git a/resources/i18n/ko.json b/resources/i18n/ko.json index 5f2b0ef604..20a672be53 100644 --- a/resources/i18n/ko.json +++ b/resources/i18n/ko.json @@ -399,7 +399,7 @@ "ExpiredDate": "토큰 만료 시각", "TokenExpiredDateHelp": "토큰 만료 시각 기본 값은 24시간 뒤입니다.", "TokenExpiredDateError": "토큰 만료 시간은 현재 시간 이후여야 합니다.", - "ServiceNameRule": "4~64자의 영문, 숫자, 밑줄(_), 하이픈(-), 마침표(.)만 허용하며, 영문으로 영문이나 숫자로 끝나야합니다.", + "ServiceNameRule": "4~24자의 영문, 숫자, 밑줄(_), 하이픈(-), 마침표(.)만 허용하며, 영문으로 영문이나 숫자로 끝나야합니다.", "FormValidationFailed": "양식 유효성 검사 실패", "resources": "자원", "Image": "이미지" diff --git a/resources/i18n/mn.json b/resources/i18n/mn.json index 8bc5d8b1ca..89c60d96d5 100644 --- a/resources/i18n/mn.json +++ b/resources/i18n/mn.json @@ -1411,7 +1411,7 @@ "TokenExpiredDateHelp": "Өгөгдмөл токен дуусах хугацаа нь 24 цагийн дараа байна.", "TokenExpiredDateError": "Токен дуусах хугацаа нь одоогийн цагаас хойш байх ёстой", "FormValidationFailed": "Маягтын баталгаажуулалт амжилтгүй боллоо", - "ServiceNameRule": "Зөвхөн 4-64 үсэг тоо, доогуур зураас(_), зураас(-), цэг(.) оруулахыг зөвшөөрөх ба энэ нь үсэг, тоон тэмдэгтээр төгсөх ёстой.", + "ServiceNameRule": "Зөвхөн 4-24 үсэг тоо, доогуур зураас(_), зураас(-), цэг(.) оруулахыг зөвшөөрөх ба энэ нь үсэг, тоон тэмдэгтээр төгсөх ёстой.", "resources": "Нөөц", "Image": "Зураг" }, diff --git a/resources/i18n/ms.json b/resources/i18n/ms.json index 539c12e7c4..dcaee17b32 100644 --- a/resources/i18n/ms.json +++ b/resources/i18n/ms.json @@ -1376,7 +1376,7 @@ "FormValidationFailed": "Pengesahan borang gagal", "StartNewServing": "Mulakan hidangan baharu", "ServiceName": "Nama Perkhidmatan", - "ServiceNameRule": "Hanya benarkan 4 hingga 64 aksara abjad angka, garis bawah(_), sempang(-), dan noktah(.) dan ia mesti berakhir dengan aksara abjad angka.", + "ServiceNameRule": "Hanya benarkan 4 hingga 24 aksara abjad angka, garis bawah(_), sempang(-), dan noktah(.) dan ia mesti berakhir dengan aksara abjad angka.", "OpenToPublic": "Terbuka Kepada Umum", "DesiredRoutingCount": "Kiraan Laluan yang Diingini", "ServingRouteErrorModalTitle": "Ralat Laluan Pelayanan", diff --git a/resources/i18n/pl.json b/resources/i18n/pl.json index 8da2435420..7a30287148 100644 --- a/resources/i18n/pl.json +++ b/resources/i18n/pl.json @@ -1337,7 +1337,7 @@ "FormValidationFailed": "Walidacja formularza nie powiodła się", "StartNewServing": "Rozpocznij nową porcję", "ServiceName": "Nazwa usługi", - "ServiceNameRule": "Dozwolone są tylko 4 do 64 znaki alfanumeryczne, podkreślenie(_), myślnik(-) i kropka(.) i muszą kończyć się znakiem alfanumerycznym.", + "ServiceNameRule": "Dozwolone są tylko 4 do 24 znaki alfanumeryczne, podkreślenie(_), myślnik(-) i kropka(.) i muszą kończyć się znakiem alfanumerycznym.", "OpenToPublic": "Otwarte dla publiczności", "DesiredRoutingCount": "Pożądana liczba tras", "ServingRouteErrorModalTitle": "Błąd trasy serwowania", diff --git a/resources/i18n/pt-BR.json b/resources/i18n/pt-BR.json index b8fdef7901..2c414239d6 100644 --- a/resources/i18n/pt-BR.json +++ b/resources/i18n/pt-BR.json @@ -1377,7 +1377,7 @@ "FormValidationFailed": "Falha na validação do formulário", "StartNewServing": "Iniciar nova dose", "ServiceName": "Nome do serviço", - "ServiceNameRule": "Só são permitidos 4 a 64 caracteres alfanuméricos, sublinhado(_), hífen(-) e ponto(.) e deve terminar com um carácter alfanumérico.", + "ServiceNameRule": "Só são permitidos 4 a 24 caracteres alfanuméricos, sublinhado(_), hífen(-) e ponto(.) e deve terminar com um carácter alfanumérico.", "OpenToPublic": "Aberto ao público", "DesiredRoutingCount": "Contagem de roteiros desejada", "ServingRouteErrorModalTitle": "Erro de rota de serviço", diff --git a/resources/i18n/pt.json b/resources/i18n/pt.json index 5e04811ff9..92b4a28837 100644 --- a/resources/i18n/pt.json +++ b/resources/i18n/pt.json @@ -1377,7 +1377,7 @@ "FormValidationFailed": "Falha na validação do formulário", "StartNewServing": "Iniciar nova dose", "ServiceName": "Nome do serviço", - "ServiceNameRule": "Só são permitidos 4 a 64 caracteres alfanuméricos, sublinhado(_), hífen(-) e ponto(.) e deve terminar com um carácter alfanumérico.", + "ServiceNameRule": "Só são permitidos 4 a 24 caracteres alfanuméricos, sublinhado(_), hífen(-) e ponto(.) e deve terminar com um carácter alfanumérico.", "OpenToPublic": "Aberto ao público", "DesiredRoutingCount": "Contagem de roteiros desejada", "ServingRouteErrorModalTitle": "Erro de rota de serviço", diff --git a/resources/i18n/ru.json b/resources/i18n/ru.json index 69befe8d90..504c5c644f 100644 --- a/resources/i18n/ru.json +++ b/resources/i18n/ru.json @@ -1412,7 +1412,7 @@ "TokenExpiredDateHelp": "По умолчанию время истечения срока действия токена составляет 24 часа.", "TokenExpiredDateError": "Время истечения срока действия токена должно быть после текущего времени", "FormValidationFailed": "Не удалось выполнить валидацию формы", - "ServiceNameRule": "Допускается только от 4 до 64 буквенно-цифровых символов, символов подчеркивания (_), дефиса (-) и точки(.), и он должен заканчиваться буквенно-цифровым символом.", + "ServiceNameRule": "Допускается только от 4 до 24 буквенно-цифровых символов, символов подчеркивания (_), дефиса (-) и точки(.), и он должен заканчиваться буквенно-цифровым символом.", "resources": "Ресурсы", "Image": "Изображение" }, diff --git a/resources/i18n/tr.json b/resources/i18n/tr.json index e16908840d..4588a554a7 100644 --- a/resources/i18n/tr.json +++ b/resources/i18n/tr.json @@ -1337,7 +1337,7 @@ "FormValidationFailed": "Form doğrulama başarısız oldu", "StartNewServing": "Yeni servis başlatın", "ServiceName": "Hizmet Adı", - "ServiceNameRule": "Yalnızca alfanümerik, alt çizgi (_), kısa çizgi (-) ve nokta (.) karakterlerinden oluşan 4 ila 64 karaktere izin verin ve alfanümerik bir karakterle bitmelidir.", + "ServiceNameRule": "Yalnızca alfanümerik, alt çizgi (_), kısa çizgi (-) ve nokta (.) karakterlerinden oluşan 4 ila 24 karaktere izin verin ve alfanümerik bir karakterle bitmelidir.", "OpenToPublic": "Halka Açık", "DesiredRoutingCount": "İstenen Yönlendirme Sayısı", "ServingRouteErrorModalTitle": "Hizmet Veren Rota Hatası", diff --git a/resources/i18n/vi.json b/resources/i18n/vi.json index 194120a067..6958c0600b 100644 --- a/resources/i18n/vi.json +++ b/resources/i18n/vi.json @@ -1376,7 +1376,7 @@ "FormValidationFailed": "Xác thực biểu mẫu không thành công", "StartNewServing": "Bắt đầu phân phát mới", "ServiceName": "Tên dịch vụ", - "ServiceNameRule": "Chỉ cho phép 4 đến 64 ký tự chữ và số, dấu gạch dưới (_), dấu gạch nối (-) và dấu chấm (.) và phải kết thúc bằng ký tự chữ và số.", + "ServiceNameRule": "Chỉ cho phép 4 đến 24 ký tự chữ và số, dấu gạch dưới (_), dấu gạch nối (-) và dấu chấm (.) và phải kết thúc bằng ký tự chữ và số.", "OpenToPublic": "Mở cửa cho công chúng", "DesiredRoutingCount": "Số lượng định tuyến mong muốn", "ServingRouteErrorModalTitle": "Lỗi tuyến đường phục vụ", diff --git a/resources/i18n/zh-CN.json b/resources/i18n/zh-CN.json index 2e1ea71a2b..73bc5d70c1 100644 --- a/resources/i18n/zh-CN.json +++ b/resources/i18n/zh-CN.json @@ -1377,7 +1377,7 @@ "FormValidationFailed": "表单验证失败", "StartNewServing": "开始新服务", "ServiceName": "服务名称", - "ServiceNameRule": "只允许 4 至 64 个字符的字母数字、下划线(_)、连字符(-)和句号(.),且必须以字母数字字符结尾。", + "ServiceNameRule": "只允许 4 至 24 个字符的字母数字、下划线(_)、连字符(-)和句号(.),且必须以字母数字字符结尾。", "OpenToPublic": "向公众开放", "DesiredRoutingCount": "所需的路由计数", "ServingRouteErrorModalTitle": "服务路由错误", diff --git a/resources/i18n/zh-TW.json b/resources/i18n/zh-TW.json index 137d4ec633..3d72f69d1a 100644 --- a/resources/i18n/zh-TW.json +++ b/resources/i18n/zh-TW.json @@ -1377,7 +1377,7 @@ "FormValidationFailed": "表单验证失败", "StartNewServing": "开始新服务", "ServiceName": "服务名称", - "ServiceNameRule": "只允许 4 至 64 个字符的字母数字、下划线(_)、连字符(-)和句号(.),且必须以字母数字字符结尾。", + "ServiceNameRule": "只允许 4 至 24 个字符的字母数字、下划线(_)、连字符(-)和句号(.),且必须以字母数字字符结尾。", "OpenToPublic": "向公众开放", "DesiredRoutingCount": "所需的路由计数", "ServingRouteErrorModalTitle": "服务路由错误",