Closed axelboc closed 3 years ago
If you haven't done so already, don't forget to read through the content guidelines. If Wikipedia in your language is not reliable-enough to use as source for country names and capitals, please take note of which source you use so we can document them in the Translation sources section in due time.
@Erim24, @josealberto4444, @Vages, @hobbes, if you can think of any workflow tips that may help our new translation contributors, please feel free to share!
@ukanuk, I remember you were working on a script for pulling country names and capitals from Wikipedia -- perhaps it's ready for use? https://github.com/ukanuk/wplangtools
There may also be ways to translate supplementary info fields automatically with an online translation service, but no one has written a script for this yet, and I wouldn't really recommend it, since the information would need to be double checked on Wikipedia anyway, and the wording can be quite niche sometimes.
Yes, please use https://github.com/ukanuk/wplangtools if you find it helpful! I tried to give plenty of examples in README.md.
Another script could be written using the pandas library with my wplangtools script to automatically translate UG's data.csv
, but I wasn't sure how helpful it would actually be considering the unknown quality of Wikipedia interwiki language links, so I've moved on to other things for now.
Thanks for the response and encouraging in making those translations.
Although it took me some time, I figured how to edit data.csv in the translation branch. Only thing I am not sure about, whether I would be able to download UG deck with my translation in order to study the deck. I know we are waiting for the release of the new deck manager, so that's the reason for my concern. If not, I would probably stick to translating UG directly in Anki as I did so far, so I can study UG along.
I would also like to mention how I made my own translation so far. I wrote Czech translation first and then keep the original English name in parentheses. The reason behind this is to achieve the ability to speak about geography in my daily life and also to maintain the internationality of geography knowledge for internet, world news etc. The product looked like this. https://ctrlv.cz/CKo6
Ideally, I would keep it this way, but if you disagreed, I would adapt and only mention Czech names. Please let me know your opinion about this.
I would also like to mention how I made my own translation so far. I wrote Czech translation first and then keep the original English name in parentheses. The reason behind this is to achieve the ability to speak about geography in my daily life and also to maintain the internationality of geography knowledge for internet, world news etc. The product looked like this. https://ctrlv.cz/CKo6
Ideally, I would keep it this way, but if you disagreed, I would adapt and only mention Czech names. Please let me know your opinion about this.
The Czech translation fields should only contain Czech. You could still merge two translations of the deck and then change the card template to show both English and Czech. I'm not sure if there's a recommended workflow for this, but it is something I'm also interested in as I intend to do the same thing.
Only thing I am not sure about, whether I would be able to download UG deck with my translation in order to study the deck.
Oh yes, of course -- sorry I should have mentioned it. You can generate the deck with Anki DM as explained in the contributor's guide:
data.csv
.composer build
. This generates the deck in a folder in the build
directory.The Czech translation fields should only contain Czech. You could still merge two translations of the deck and then change the card template to show both English and Czech. I'm not sure if there's a recommended workflow for this, but it is something I'm also interested in as I intend to do the same thing.
Indeed, translated fields must not include English in parens. Unfortunately, there's no way to show both English and Czech in the templates at the moment, because the Czech deck does not include the English fields -- only the Czech fields. It's a very interesting use case, though, which I'm certain our future deck manager will support.
Thanks for responses. With this information, I decided to translate directly in Anki and then use AnkiDM and CrowAnki. Also, I will mention only the Czech names. I am glad the UG v4.0 was released today, I will head into work.
Sorry for bothering, but I am quite lost. So far I translated North and South America and wanted to try exporting it to see how it works. I believe I installed PHP and composer, but I don't know how to continue. How to create composer.json and where can I composer install? I have anki-dm executable but it doesn't do anything but opening cmd and closing it immediately. I tried to find some youtube tutorials for dummies but couldn't find anything useful.
On the other hand, simply exporting the deck with CrowdAnki isn't a problem. Perhaps I could upload the exported deck to you in order to not burden you with explaining to me how to properly use Anki-dm.
Sorry for bothering, but I am quite lost. So far I translated North and South America and wanted to try exporting it to see how it works. I believe I installed PHP and composer, but I don't know how to continue. How to create composer.json and where can I composer install? I have anki-dm executable but it doesn't do anything but opening cmd and closing it immediately. I tried to find some youtube tutorials for dummies but couldn't find anything useful.
Yeah, the process isn't very streamlined. Unfortunately, I don't really use Windows so I can't help, since there are some slight subtleties with how it does things.
Perhaps I could upload the exported deck to you in order to not burden you with explaining to me how to properly use Anki-dm.
As another alternative, you could export with the built-in "plain text" exporter — in the exporter interface choose "Notes in Plain Text" as the export format (include everything — don't uncheck the boxes). This produces a TSV (tab-separated values) file, where all the fields are separated by tabs. (Our data.csv
is a comma-separated values file, where fields are separated by commas. As you can guess, converting from one to the other is pretty straightforward and can be done by any spreadsheet program.)
(In the general case, the "plain text" export isn't an alternative to the CrowdAnki → anki-dm method, since it drops the templates, styling and GUIDs, but in this case we're not interested in them, since they're not being changed.)
How to create composer.json and where can I composer install? I have anki-dm executable but it doesn't do anything but opening cmd and closing it immediately.
Installing PHP and composer was the difficult step, so you should be fine for the rest. Here is a step-by-step:
my-deck
.composer.json
into my-deck
.my-deck
(use the cd
command to get to the folder).composer install
. If you get an "unknown command composer
" or something like that, it means composer
's installation folder is not in your Windows PATH
. You can add it to your PATH
and log in to your user session again, or just run "C:/path/to/composer" install
.vendor
folder in my-deck
. This is where Anki DM is now installed.my-deck
, you should now be able to run composer run dm import "C:/path/to/deck/directory/exported/by/CrowdAnki"
.src
folder in my-deck
and it should contain various files including data.csv
with your translations.I hope this helps. If you can't get it to work, don't worry about it. We can do this ourselves as you suggest once you're done with the translations.
Thanks for kind responses. @axelboc's instructions are clear, however, I am still getting error. I ran composer install and it seems it was installed successfully, in "my-deck" folder was created vendor folder. But after using command composer run dm import I get error code 1. I am adding a screenshot for clarity. (https://ctrlv.cz/bfMp)
I guess the reason behind this is that terminal cannot find deck.json file. A am also not sure if I am supposed to use quotation marks or not, but the command didn't work regardless of using them.
It is also possible there is a major issue I am not aware of, in that case, I would incline to not using anki-dm as @axelboc and @aplaice suggested and just export it either as plain text or upload the exported folder with CrowdAnki.
Sorry for causing troubles, I am trying my best.
Hmm, that's strange. Try renaming the JSON file of the exported deck to match the file Anki-DM is looking for. If it doesn't work, plain text will do fine. 👍
Oh, it worked, I have src folder containing various files! Thank you very much. I also finished the translation. Should I upload it to you, or should I wait for the new deck manager? If yes, where/how?
Oh, it worked, I have src folder containing various files! Thank you very much. I also finished the translation. Should I upload it to you, or should I wait for the new deck manager? If yes, where/how?
Wow, that was fast! Thanks for your work!
I don't think it'd be a good idea to merge another translation at the moment (sorry!), as it'd make the combined data.csv
completely unwieldy. However, it'd still be great if we could have a look at the translation, in case we have some feedback (to the extent that we can have, without speaking Czech :) ).
You could copy your generated src/data.csv
into your fork of anki-ultimate-geography
replacing the existing src/data.csv
(into any branch and without worrying about the existing contents of src/data.csv
since this won't be getting merged, in this form, anyway) and make a pull request (again into any branch).
Alternatively, you could just copy-paste the src/data.csv
into a GitHub gist.
Sorry for the late response, I was a couple of days off PC. I copied my data to data.csv in translation branch, so if I did it right, you should be able to check my translation.
@Flippo008 Thanks a lot! :)
I've replied here, with some translation-specific comments. (Sorry for the jumps between threads, but I think it makes sense to keep the "general" translation discussion about methods etc. here, and the Czech-specific discussion in the Czech thread.)
Hello, I'm back, with a new account. My old email address is unavailable. Some tasks took my time. I'm sorry. One of my findings during these days is VLOOKUP in a spreadsheet. When you've got this function and Wikidata, can you guess what it means? https://polyglotclub.com/wiki/Language/Multiple-languages/Culture/How-to-make-a-TSV-file
I guess the temporary recommendations are over! :grin:
@Flippo008, @emiham, @pt-pt-guy, @hoi3, @GrimPixel, now that the inclusion rules have been applied and that v4 is (almost) out, I think you can safely start your translations. Here is the process I recommend, which should allow us to integrate your translations into the deck fairly easily, once the new deck manager is in place and #143 is resolved:
translation
branch.data.csv
, replacexx
in the column titles with your translation's language code.data.csv
as you go!If you prefer translating the deck in Anki, that's fine too. There are some pitfalls, like not being able to upgrade the deck while you're translating it, but I doubt it will be a problem, since there's little chance we'll make a release before the new deck manager comes along. You never know, though... 😄
If you go the Anki route, once we're ready to integrate your translation, you'll need to set up a fresh repo with Anki DM, export your deck with CrowAnki, and get Anki DM to disassemble it. The GUIDs won't be the same, but hopefully we can use one of the common fields like the
Flag
field to match the notes.Good luck!! 💪