Skip to content

Commit

Permalink
[master] fix: add rule on app category name to match backend rule (#4408
Browse files Browse the repository at this point in the history
)

fix: add rule on app category name to match backend rule

Signed-off-by: ROOMrepair <[email protected]>
Co-authored-by: ROOMrepair <[email protected]>
  • Loading branch information
ks-ci-bot and ROOMrepair authored Jan 3, 2025
1 parent f425103 commit a672c34
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions locales/en/l10n-appStoreManagement-appCategories-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module.exports = {
ENTER_CATEGORY_NAME_TIP: 'Please enter a category name.',
CATEGORY_NAME_DESC:
'The name can contain any characters and the maximum length is 20 characters.',
APP_CATEGORY_NAME_DESC:
'The name must consist of lower case alphanumeric characters, (-) or (.) and must start and end with an alphanumeric character.',
// All Categories > Eit
// All Categories > Delete
DELETE_CATEGORY_DESC: 'Are you sure you want to delete the category <b>{name}</b>?',
Expand Down
2 changes: 2 additions & 0 deletions locales/es/l10n-appStoreManagement-appCategories-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module.exports = {
ENTER_CATEGORY_NAME_TIP: 'Por favor, introduzca un nombre de categoría.',
CATEGORY_NAME_DESC:
'El nombre puede contener cualquier carácter y el largo máximo es de 20 caracteres.',
APP_CATEGORY_NAME_DESC:
'El nombre debe consistir en caracteres alfanuméricos en minúsculas, (-) o (.) y debe comenzar y terminar con un carácter alfanumérico.',
// All Categories > Eit
// All Categories > Delete
DELETE_CATEGORY_DESC: '¿Está seguro que desea eliminar la categoría <b>{name}</b>?',
Expand Down
2 changes: 2 additions & 0 deletions locales/tc/l10n-appStoreManagement-appCategories-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module.exports = {
// All Categories > Add
ENTER_CATEGORY_NAME_TIP: '請輸入類別名稱。',
CATEGORY_NAME_DESC: '名稱可包含任意字元,最長 20 個字元。',
APP_CATEGORY_NAME_DESC:
'名稱只能包含小寫字母、數字、隔符號(-)和點(.),必須以小寫字母或數字開頭及結尾,最長 20 個字元。',
// All Categories > Eit
// All Categories > Delete
DELETE_CATEGORY_DESC: '您確定要刪除類別 <b>{name}</b> 嗎?',
Expand Down
4 changes: 3 additions & 1 deletion locales/zh/l10n-appStoreManagement-appCategories-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ module.exports = {
// All Categories > Add
ENTER_CATEGORY_NAME_TIP: '请输入分类名称。',
CATEGORY_NAME_DESC: '名称可包含任意字符,最长 20 个字符。',
// All Categories > Eit
APP_CATEGORY_NAME_DESC:
'名称只能包含小写字母、数字、连字符(-)和句点(.),必须以小写字母或数字开头及结尾,最长 20 个字符',
// All Categories > Eikt
// All Categories > Delete
DELETE_CATEGORY_DESC: '您确定要删除分类 <b>{name}</b> 吗?',
// List
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/constants/patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ export const PATTERN_UTC_TIME = /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[
export const PATTERN_WORD = /(?=.*?[A-Z])(?=.*?[a-z])/;
export const PATTERN_NUMBER = /(?=.*?[0-9])/;
export const PATTERN_INTEGER_NUMBER = /^[+]{0,1}(\d+)$/;
export const PATTERN_APPTEMPLATE_CATEGORY_NAME =
/^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/;

0 comments on commit a672c34

Please sign in to comment.