Bungie-net / api

Resources for the Bungie.net API
Other
1.21k stars 92 forks source link

Support other languages in description of DestinyLoreDefinition entities . #870

Open bdh0404 opened 5 years ago

bdh0404 commented 5 years ago

The description of DestinyLoreDefinition entities are written in English. Can you add locale option for accessing lores with other languages by API?

floatingatoll commented 5 years ago

To ask an odd question, what benefit would this provide you? (Not critique, just trying to draw out more story.)

On Feb 3, 2019, at 17:20, bdh0404 notifications@github.com wrote:

The description of DestinyLoreDefinition entities are written in English. Can you add locale option for accessing lores with other languages by API?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bdh0404 commented 5 years ago

Well, that could help more people that are not good at English to understand lore. I think the lore community are skewed to English users due to the lack of accessibility of other languages.

vthornheart-bng commented 5 years ago

Hmm, are you seeing that for all Lore entries, and which languages? I'm doing some spot checking and I didn't see any situations of English in the Lore for other languages - but I may be missing it. There's a lot of lore and I'm just hunting and pecking around looking for English text. Can you send some examples of where you're seeing it?

bdh0404 commented 5 years ago

DestinyLoreDefinition Fideicide III with hash value 428936651 (which can be applied to any DestinyLoreDefinition object) with the following json string

{ "displayProperties": { "description": "To end a world with a shot or pin eternity on a blade; to see your sisters lost to rot and their undone works decayed—the death of an immortal wastes the infinite potential of all they might become. An immortal's grief and murder-guilt, left untended, will never fade. Thus it became known to those who fought in the Theodicy War that they had committed an incomparable evil. However, they could not confront their own responsibility, so they rose up in wrath against those who had given them cause, whether by caging them in flesh bodies or by drawing blood over grievance. The war continued by spear and bow, by knife and scalpel, by old machine and new invention. Ever did the Diasyrm's faithful call for the unawaring of Queen Alis Li.\n\nNow there entered into the Diasyrm's camp Osana, mother of Mara, famed for her skill in negotiating contested land. She had come with her son Uldren, who could win a place in any camp for his beauty and for the regal crow-eagle that alighted on his shoulder.\n\n\"I come from Mara,\" said Osana, \"whose heart has frozen in her chest. If you will end the killing, she will tell you any secret that you desire.\"\n\nFor his part, Uldren went among the Diasyrm's warriors and spread ill tidings of Mara's knowledge, saying, \"Mara remembers how the Queen led us here out of chaos and saved us from the twin blindness of darkness and light. Mara knows what the Queen keeps secret. Mara has seen the strife in our souls, the clash from which we were made. We could not ever have been gods with this flaw in us! Rather, we were made from this schism. For as all life is born from energy gradient, as life in the World Before was born from the gradient between hot proton-rich ventwater and cold seawater, we were born of the shadowline at the edge of Light and Dark. We are tremors in that fault. Forever will that schism lead us.\"\n\nHearing this new heresy, the Eccaleists were seized with rapture and scattered to the points of the compass, telling all they met, \"We are the yield of a mighty engine! We could never have been gods! Like diamonds, we were crushed into being. Like diamonds, we hold flaws.\"\n\nMeanwhile Osana spoke to the Diasyrm, who was also heartsick from the killing, and who longed to withdraw from the world and seek transcendence within. \"There is no weregild for the murder of an immortal,\" Osana counseled her. \"You must become a teacher or a midwife and devote yourself to the enrichment of new lives.\"\n\nBut the Diasyrm craved secret knowledge, and she sought Mara upon the mountaintop. Here, she vanished. If she was ever known again, it was not by the name Diasyrm.\n\nWhen there was peace, Queen Li ruled the Awoken for a time; however, the guilt of the war lay heavy upon her, and after an age of peace and progress, she abdicated to a new Queen.", "name": "Fideicide III", "icon": "/common/destiny2_content/icons/f53d2634f2f702c818572d7c1639b136.png", "hasIcon": true }, "subtitle": "", "hash": 428936651, "index": 508, "redacted": false, "blacklisted": false }

What I want is extending "description" string with adding texts of other languages for all DestinyLoreDefinition objects.

vthornheart-bng commented 5 years ago

Hmm, I went and looked in the definitions for non-english databases, and that entry looks to be properly translated.

Is it possible that you're looking at the English definitions and not the definitions for other locales? We have different databases per language, so for example if you want to get at the latest French definitions you have to grab the manifest data (/Platform/Manifest/) and in the mobileWorldContentPaths property use the path related to the locale you care about.

For instance, if you wanted French lore, you'd have to use the path pointed at by mobileWorldContentPaths.fr, which happens right now to be:

/common/destiny2_content/sqlite/fr/world_sql_content_956c0e602ef9d8fb24d11428ff6f0e64.content

If you look in that one, you get:

{"displayProperties":{"description":"Mettre fin à un monde avec un tir ou épingler l'éternité sur une lame, voir vos sœurs se décomposer et leurs travaux inachevés pourrir ; la mort d'un immortel gâche le potentiel infini de tout ce qu'il aurait pu devenir. La peine d'un immortel et la culpabilité pour un meurtre ne s'estompent jamais si elles sont négligées. C'est ainsi que ceux qui prirent part à la Guerre de la théodicée découvrirent qu'ils avaient commis un acte malfaisant à nul autre pareil. Cependant, ils ne pouvaient faire face à leurs propres responsabilités, alors ils s'en prenaient aux instigateurs d'un tel acte, ceux qui les avaient enfermés dans des corps faits de chair ou les avaient incités à faire couler le sang en cas de grief. La guerre continua à coup d'épée et d'arc, de couteau et de scalpel, de machines anciennes et d'inventions nouvelles. Les fidèles de la Diasyrme exigèrent la déposition de la Reine Alis Li.\n\nOsana, mère de Mara et célèbre pour ses talents de négociatrice des terres contestées, se rendit alors dans le camp de la Diasyrme. Elle était venue avec son fils Uldren, qui pouvait gagner sa place dans n'importe quel camp grâce à sa beauté et à l'aigle-corbeau royal posé sur son épaule.\n\n« Je viens de la part de Mara dont le cœur s'est figé dans la poitrine, déclara Osana. Si vous mettez un terme au massacre, elle vous contera le secret que vous convoitez le plus. »\n\nDe son côté, Uldren passa parmi les guerriers de la Diasyrme et répandit la mauvaise nouvelle connue de Mara : « Mara se souvient de la manière dont la Reine nous a sortis du chaos pour nous mener ici, et nous a sauvés de l'aveuglement double des ténèbres et de la lumière. Mara connaît le secret de la Reine. Mara a vu le conflit dans nos âmes, l'affrontement à partir duquel nous avons été créés. Nous n'aurions pas pu être des dieux avec ce défaut ! Nous avons été fabriqués à partir de ce schisme, car toute vie naît d'un gradient d'énergie. La vie du Monde d'avant était née du gradient entre l'eau chaude et riche en protons d'un conduit et l'eau froide de la mer. Ici, nous sommes nés sur la ligne d'ombre à la limite entre la Lumière et l'Obscurité. Nous sommes les tremblements de cette faute. Ce schisme nous guidera pour toujours. »\n\nEn entendant cette nouvelle hérésie, les Eccaléistes furent pris d'extase et se dispersèrent aux quatre coins du camp, expliquant à tous ceux qu'ils rencontraient : « Nous sommes le fruit d'un puissant moteur ! Nous n'aurions jamais pu être des dieux ! À l'instar des diamants, nous avons été compressés pour exister. Et à l'instar des diamants, nous avons nos défauts. »\n\nPendant ce temps, Osana parlait à la Diasyrme, qui était écœurée des combats et souhaitait se retirer du monde pour y trouver la transcendance. « Le meurtre d'un immortel n'a pas de prix, expliqua Osana. Vous devez devenir une enseignante ou une instigatrice, et vous dévouer à l'enrichissement de nouvelles vies. »\n\nMais la Diasyrme désirait connaître la connaissance secrète, et elle alla trouver Mara au sommet de la montagne. Là, elle disparut. Si elle réapparut un jour, ce n'est pas sous le nom de Diasyrme.\n\nLorsque la paix fut revenue, la Reine Li régna sur les Éveillés pendant un temps, mais rongée par la culpabilité de la guerre, et après une ère de paix et de progrès, elle abdiqua en faveur d'une nouvelle Reine.","name":"Fidéicide III","icon":"/common/destiny2_content/icons/f53d2634f2f702c818572d7c1639b136.png","hasIcon":true},"subtitle":"","hash":428936651,"index":508,"redacted":false,"blacklisted":false}

vthornheart-bng commented 5 years ago

Note that, once you start grabbing the databases for the locale(s) you want to use, you'll get everything translated: not just Lore, but items, objectives, everything. It's super handy!

bdh0404 commented 5 years ago

OK thanks.

vthornheart-bng commented 5 years ago

No prob! Let me know if you run into any trouble with that!

bdh0404 commented 5 years ago

O, Sorry, one more question. What is the character encoding of the database of Korean version? I'd like to use json version (which is "jsonWorldContentPaths") but I cannot read some characters (which will be Korean characters) due to encoding issues from Microsoft Edge.

vthornheart-bng commented 5 years ago

Ah, it should all be UTF-8!