Skip to content

Commit

Permalink
fix: Update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Jun 6, 2024
1 parent bb0bd38 commit 14fb459
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ import {
MAX_EMOTE_FILE_SIZE,
MAX_SKIN_FILE_SIZE,
MAX_THUMBNAIL_FILE_SIZE,
MAX_WEARABLE_FILE_SIZE
MAX_WEARABLE_FILE_SIZE,
MAX_SMART_WEARABLE_FILE_SIZE
} from '@dcl/builder-client/dist/files/constants'

export default class CreateSingleItemModal extends React.PureComponent<Props, State> {
Expand Down Expand Up @@ -945,6 +946,7 @@ export default class CreateSingleItemModal extends React.PureComponent<Props, St
}
const isSkin = category === WearableCategory.SKIN
const isEmote = type === ItemType.EMOTE
const isSmartWearable = isSmart({ type, contents: this.state.contents })
const isRequirementMet = required.every(prop => prop !== undefined)

if (isRequirementMet && isEmote && modelSize && modelSize > MAX_EMOTE_FILE_SIZE) {
Expand All @@ -967,7 +969,17 @@ export default class CreateSingleItemModal extends React.PureComponent<Props, St
return false
}

if (isRequirementMet && !isSkin && modelSize && modelSize > MAX_WEARABLE_FILE_SIZE) {
if (isRequirementMet && !isSkin && isSmartWearable && modelSize && modelSize > MAX_SMART_WEARABLE_FILE_SIZE) {
this.setState({
error: t('create_single_item_modal.error.item_too_big', {
size: `${toMB(MAX_SMART_WEARABLE_FILE_SIZE)}MB`,
type: `smart wearable`
})
})
return false
}

if (isRequirementMet && !isSkin && !isSmartWearable && modelSize && modelSize > MAX_WEARABLE_FILE_SIZE) {
this.setState({
error: t('create_single_item_modal.error.item_too_big', {
size: `${toMB(MAX_WEARABLE_FILE_SIZE)}MB`,
Expand Down
4 changes: 4 additions & 0 deletions src/modules/translation/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@
"title": "El item es demasiado grande para cargarlo",
"message": "El tamaño máximo de archivo es de 2MB para Emotes."
},
"smart_wearable_too_big": {
"title": "El archivo es demasiado grande para cargarlo",
"message": "Todos los archivos dentro del archivo Smart Wearable .zip deben pesar menos de 3MB."
},
"unknown_required_permissions": {
"title": "{count, plural, one {El permiso} other {Los permisos}} {wrong_configurations} de la vestimenta interactiva no {count, plural, one {existe} other {existen}}. Por favor, corrija el archivo 'scene.json'.",
"message": "Para obtener {learn_more}, consulte la documentación."
Expand Down
4 changes: 4 additions & 0 deletions src/modules/translation/languages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@
"title": "文件太大,无法上传",
"message": "表情的最大文件大小为 2MB。"
},
"smart_wearable_too_big": {
"title": "文件太大,无法上传",
"message": "智能穿戴设备 .zip 文件中的所有文件必须小于 3MB。"
},
"unknown_required_permissions": {
"title": "智能穿戴设备{count,plural,一个{权限}其他{权限}}{wrong_configurations}{count,plural,一个{不}其他{不}}存在。请更正' 场景.json'。",
"message": "有关更多信息,请查看文档 {learn_more}。"
Expand Down

0 comments on commit 14fb459

Please sign in to comment.