Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Only planet name is in pecified language, other infos are not #101

Open
SherkeyXD opened this issue May 9, 2024 · 1 comment
Open
Labels
blocked issue needs more information or input to be picked up bug Something isn't working mapping This issue or it's solution is related to how information is mapped
Milestone

Comments

@SherkeyXD
Copy link

SherkeyXD commented May 9, 2024

Link to faulty endpoint

/api/v1/planets

The name of your client/application

SherkeyXD/helldivers-2-api-python

Request information

class API:
    api_root = "https://api.helldivers2.dev"
    headers = {
        "Accept": "application/json",
        "Accept-Language": "zh-Hans",
        "User-Agent": "SherkeyXD/helldivers-2-api-python",
        "X-Super-Client": "writing.prts.tech",
    }

    @staticmethod
    def __makeRequest(url: str, max_retry: int = 3):
        for _ in range(max_retry):
            res = requests.get(url, headers=API.headers)
            if res.status_code == 200:
                return res.json()
        return None

    @staticmethod
    def GetApiV1Planets(index : int) -> dict:
        """
        Fetches a specific Planet identified by index.
        """
        info = API.__makeRequest(API.api_root + f"/api/v1/planets/{index}")
        return info

Steps to reproduce

Set "Accept-Language": "zh-Hans" in header, then request.

What is expected?

All info should be in Chinese.

What is actually happening?

Only planet name is in Chinese, other infos are still in English.

{
    "index": 79,
    "name": "希斯",
    "sector": "Orion",
    "biome": {
        "name": "Winter", // Should be in Chinese
        "description": "Submerged in eternal winter, this world's frosty peaks glimmer in the light of its too-distant star." // Should be in Chinese
    },
    "hazards": [
        {
            "name": "Extreme Cold", // Should be in Chinese
            "description": "Icy temperatures reduce rate of fire and delay heat buildup in weapons." // Should be in Chinese
        },
        {
            "name": "Blizzards", // Should be in Chinese
            "description": "Intense blizzard reduce mobility and moderately reduce visibility for both enemy and friendly units." // Should be in Chinese
        }
    ],
    // ...
}

System Info

No response

Any additional comments?

Not only zh-Hans meets this problem, all languages are experiencing this.

@SherkeyXD SherkeyXD added the bug Something isn't working label May 9, 2024
@dealloc
Copy link
Member

dealloc commented May 11, 2024

the problem here is that we'd need to get biomes.json and environmentals.json translated.

@chatterchats do we have any way of maintaining this?

@dealloc dealloc added the mapping This issue or it's solution is related to how information is mapped label May 11, 2024
@dealloc dealloc added this to the V1 milestone May 11, 2024
@dealloc dealloc added the blocked issue needs more information or input to be picked up label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked issue needs more information or input to be picked up bug Something isn't working mapping This issue or it's solution is related to how information is mapped
Projects
None yet
Development

No branches or pull requests

2 participants