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

Feature Request - API in other languages (German...) #502

Open
mortensen opened this issue May 20, 2024 · 8 comments
Open

Feature Request - API in other languages (German...) #502

mortensen opened this issue May 20, 2024 · 8 comments

Comments

@mortensen
Copy link

The SRD is available in german too. It would be awesome to see the API have support for that language too. I guess it will be more than just a language flag, because then its not called item or feat or spell. Instead maybe the objects are called diferent. But the best aproach should be checked before implementing it.

@mortensen
Copy link
Author

mortensen commented May 20, 2024

@mortensen mortensen reopened this May 20, 2024
@Xysto
Copy link

Xysto commented May 21, 2024

For what it's worth, I am available to contribute for the french language (I do not guarantee the time it will take me to do the whole SRD).

It will be nice to have a collaborative tool with the "missing translations" compared to the english version so anyone can contribute time to time to fill out the blank. Is that possible ? With maybe the PR system of Github ?

And if the feature is available on the API but the translation not over, we can imagine that there is a default fallback on the English version of the object. Does that make sens ? (to be clear I do not have the skills to contribute to the implementation of the "language feature", only the translation in french)

@mortensen
Copy link
Author

mortensen commented May 21, 2024

@Xysto WotC released the SRD already in 5 languages including french:

https://dnd.wizards.com/fr/resources/systems-reference-document

Its less of a Translation issue i guess but more a question on how to alter / extend the API programmatically. And there is already a v2 in work for the API.

I would hope in the end the tags / objects will still be referenced in English and just filled with the translated text which can be sent in via a new optional language flag... Maybe a mapping table for keywords that need to be translated. That's where we could maybe help out.

Example: key "Cost" in German may be "Preis" or "Kosten". To be able to get the German text from the SRD source.

@Xysto
Copy link

Xysto commented May 21, 2024

Yes of course, I did not make my point very clear sorry. I know the translation is already here but as I understood, it is more than painful to parse automatically the SRD's pdf to the json format that Open5e is using (I truly understand why). My proposal was to help to manually import the french SRD to the json format if there is no other choice.

As for the V2 API, I also understood that it will be a huge breaking change for the data format as well. Do you know if there is a way to participate to the discussion or if there is a workgroup that I can join to maybe contribute on that part also? Is there a wip json schema or something similar? I only have this project for reference.

@calumbell
Copy link
Contributor

Thanks for your suggestion @mortensen! Reading through the discussion on Discord about this feature request it looks like there is a concensus that this is something that we want to add.

Here are some questions that that spring to mind when thinking about getting this feature up and running:

A) How do we model the data for different langauge versions of articles from the SRD?
B) How will the API handle requests for material is non-English languages?
C) How will non-English language articles be accessed and displayed on the website?

This repo (open5e/open5e) contains the source code for the front-end website (www.open5e.com), the backend repo with the source code for the API can be found at github.com/open5e/open5e-api. As such, C is probably best handled here in this repo. A & B are backend issues and probably should be handled in the open5e-api repo. I'd be happy to open a similar issue there (which links back to this one) in the next few days. Unless you get to it first

@augustjohnson
Copy link
Collaborator

augustjohnson commented May 22, 2024

I think that the general way to support this is that the SRD in German is a new document.
The API should reasonably support this without too much trouble. Here are a few things that could be problems:

  1. UTF-8? Is that standard enough in all of our presentation layers?
  2. Document selection UI? - Just adding it as another document is a little strange, but it's not the WRONG approach.
  3. Mapping a given item in one language to the same item in another language? - This is a complex interaction.

@mortensen
Copy link
Author

UTF-8 should be sufficient for french, German, italian, English and spanish.

@mortensen
Copy link
Author

See open5e/open5e-api#457 for the work on the german source file.
@Xysto Feel free to create a similar ticket for french if you´d like :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants