Skip to content

Issue During Component Creation – Template Language Mismatch #15434

Description

@saubhagya14

Describe the issue

Hi Team,

We are facing an issue during component creation. Our template file is named zh_Hans.json, and the JSON file inside the ZIP is also named zh_Hans.json. However, we encountered a validation error as shown below:

{
"type": "validation_error",
"errors": [
{
"code": "invalid",
"detail": "Template language (zh) does not match source language (en)!",
"attr": "template"
},
{
"code": "invalid",
"detail": "Template language (zh) does not match source language (en)!",
"attr": "source_language"
}
]
}

It seems the system is expecting the source language to be en, but our template is in zh_Hans. Could you please help us understand how to resolve this validation error?

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. base_url {{base_url}}/api/projects/sandip-project-bangladesh-to-english-manual-backend/components/
  2. token :
  3. -form 'zipfile=@"/C:/Users/Saubhagya.patra/Downloads/zh_Hans.zip"'
    --form 'name="register"'
    --form 'file_format="json"'
    --form 'filemask="*.json"'
    --form 'repo="local:"'
    --form 'vcs="local"'
    --form 'template="zh_Hans.json"'
    --form 'slug="register"'

Expected behavior

No response

Screenshots

No response

Exception traceback

How do you run Weblate?

No response

Weblate versions

No response

Weblate deploy checks

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions