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

Marathi translation #72

Open
niruvt opened this issue Jul 28, 2020 · 48 comments
Open

Marathi translation #72

niruvt opened this issue Jul 28, 2020 · 48 comments
Assignees
Labels
translation Enhancements related to translation

Comments

@niruvt
Copy link
Contributor

niruvt commented Jul 28, 2020

Hello,

I would like to contribute Marathi translation. I have forked the repository. Kindly let me know how to add a PR.

Note - The translation is not yet complete. It is under progress.

@PhelypeOleinik
Copy link
Contributor

When you're done translating you can make a PR by going to your fork then clicking the “Pull request” button near the top. In my fork it looks like this:

Screenshot from 2020-07-28 14-26-19

@joulev
Copy link
Contributor

joulev commented Jul 28, 2020

@NiranjanTambe Also if you haven't finished yet, you can mark the PR as "draft", so that it is not merged too early but others are still notified about the progress.

@davidcarlisle davidcarlisle added the translation Enhancements related to translation label Jul 28, 2020
@davidcarlisle
Copy link
Member

davidcarlisle commented Jul 28, 2020

I tried your first example

% !TeX xelatex
\documentclass{article}
\usepackage{marathi}

\begin{document}
नमस्कार.
\end{document}

[fontconfig now configured so this example works, initial comment deleted]

@joulev
Copy link
Contributor

joulev commented Jul 28, 2020

@davidcarlisle It is in a standard TeX Live installation. https://ctan.org/tex-archive/fonts/shobhika

@davidcarlisle
Copy link
Member

@joulev ah fontconfig strikes again :( lualatex finds it I'll configure fontconfig on the server so xelatex finds it by name as well.

@davidcarlisle
Copy link
Member

image

@davidcarlisle
Copy link
Member

@joulev thanks for the correction. fontconfig has now cached the texlive fonts at latexcgi.xyz so the above example now works with xelatex and lualatex using the latex online button at learnlatex.org

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

Thanks @joulev !

@davidcarlisle Can you please also cache package EkType-Tanka? It provides five Devanagari fonts, out of which I might need to use some fonts.

@joulev
Copy link
Contributor

joulev commented Jul 29, 2020

@NiranjanTambe It should work already as the package is in a standard TeX Live distribution.

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

Shobhika also was in a standard TeX Live distribution, but @davidcarlisle had to do something to make it available on this site, right? Don't we need to repeat it for these fonts?

@joulev
Copy link
Contributor

joulev commented Jul 29, 2020

@NiranjanTambe AFAIK LaTeXCGI can work for any packages in TL. No special considerations for any packages needed.

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

Okay! Thanks

@Skillmon
Copy link
Member

@NiranjanTambe the problem was that XeLaTeX couldn't find the fonts by name because fontconfig wasn't run on the TeX Live fonts folder, that's what @davidcarlisle fixed to make the initial example work. Now every font contained in TeX Live should work.

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

Sounds great :) Thanks for the explanation.

@davidcarlisle
Copy link
Member

@NiranjanTambe if you delete the CNAME file and enable github pages (a check box in the settings on your fork) the site should appear at

https://niranjantambe.github.io/learnlatex.github.io/

and you can test the examples work directly.

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

@davidcarlisle Thanks.
I removed CNAME and enabled GitHub pages. I can now see the page, but still I can't see mr in the language selection tool. What do I need to do for that?

@davidcarlisle
Copy link
Member

see https://www.learnlatex.org/TRANSLATIONS add mr to the list in _config.yml should be all you need

@davidcarlisle
Copy link
Member

meanwhile I can see the buttons at https://niranjantambe.github.io/learnlatex.github.io/mr/lesson-03 but can no longer read them:-)

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

see https://www.learnlatex.org/TRANSLATIONS add mr to the list in _config.yml should be all you need

Does it take some time to adjust? My browser is redirecting me to the homepage when I open https://niranjantambe.github.io/learnlatex.github.io/mr

and yes I have translated the buttons too. I hope it's fine :)

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

Oh I have received a warning in my mailbox from GitHub, which says -

The page build completed successfully, but returned the following warning for the master branch:
The CNAME www.learnlatex.org is already taken. Check out https://help.github.com/articles/troubleshooting-custom-domains#cname-errors for more information.

Did I do something wrong in my code? How to rebuild the whole thing without the CNAME file?

@davidcarlisle
Copy link
Member

davidcarlisle commented Jul 29, 2020

looks OK as far as I can see but I can not see your github repository settings, does it have the custom DNS set to learnlatex.org? if so uncheck that and let it use the default github address, either that or the mail you got was simply delayed from the initial build before you deleted the CNAME.

@davidcarlisle
Copy link
Member

https://niranjantambe.github.io/learnlatex.github.io/mr/help

works and the link in there to

https://niranjantambe.github.io/learnlatex.github.io/mr/more-14

works

That is probably enough for you to do the translation and we can fix up any remaining things once it is merged back to the main site but the one thing that isn't working is your main index page

https://niranjantambe.github.io/learnlatex.github.io/mr/

is acting line the english one and redirecting to the (English) top level page.

AH!! I see what is wrong. You followed the instructions in TRANSLATIONS but they are wrong:-)

Delete the file mr/index.html that is a small stub html file that forces a redirect to the top level so that

https://www.learnlatex.org/en is the same as https://www.learnlatex.org

That is only required for English.

In mr you have both index.html and index.md but the index.md one is not used (as it would make an index,html which already exists) so if you delete mr/index.html then the site should use your index.md file and things will work better hopefully.

Sorry about that.

@niruvt
Copy link
Contributor Author

niruvt commented Jul 29, 2020

I removed the html file and now the index page works. Thanks.

I have one more request. Can you please install the latest version of package marathi (v1.3)? I checked the TeX Live repository and the latest version is released there. You can find it here. I need it for this example.

@davidcarlisle
Copy link
Member

@NiranjanTambe I did a tlmgr update a couple of days ago I will do one again now then latexcgi.xyz will have whatever is in texlive 2020.

overleaf is texlive 2019 (until later in the year) so marathi.sty is not there but I just adapted the javascript to add it to the projects

If you try

https://davidcarlisle.github.io/ll/mr/help

then all four buttons should work, that is xelatex and lualatex on overleaf and latexcgi.xyz

To get the overleaf buttons to work you need the mr/includes/buttons.js from

https://github.com/davidcarlisle/ll/blob/master/mr/includes/buttons.js

That extends the overleaf submisision to add marathi.sty (it may not be the latest version, you can check:-)

speaking of versions it would be helpful if the package did

\ProvidesPackage{marathi}[2020-07-29  v1.5 Marathi Support]

or similar that way the version of the package used is recorded in the latex log file. You do not have the optional argument currently.

... I just updated texlive at latexcgi.xyz but marathi.sty no longer works in luatatex:

! Undefined control sequence.
l.92 \defaultfontfeatures
                       [\rmfamily,\sffamily,\ttfamily]{Script=Devanagari,Ren...
? 
! Emergency stop.
l.92 \defaultfontfeatures
                       [\rmfamily,\sffamily,\ttfamily]{Script=Devanagari,Ren...
End of file on the terminal!

I get the same on my local system.

@joulev
Copy link
Contributor

joulev commented Jul 29, 2020

@NiranjanTambe Your package is good, however as this is the guide for absolute newbies, we want to make sure all instructions are best practices and have been verified and frequently used by a good number of users.

I am afraid your package is a bit too new to be considered the best practice by all Indian TeX users. It is also more unstable than it should be (see @davidcarlisle's message above).

Therefore I suggest a mr/language-01 having a section showing the way that most Indian TeX users are using for Marathi in LaTeX. Description about marathi can be put to a different section under the same language-01 or a separate language-02 if you want to.

@joulev
Copy link
Contributor

joulev commented Jul 29, 2020

I need it for this example.

@NiranjanTambe I think, in all pages other than the language-specific ones, you should keep the code part unmodified and only translate the comments. Not sure what the main site designers think though. @josephwright @davidcarlisle

@josephwright
Copy link
Contributor

Indeed: as far as possible, the 'main thread' lessons should have the same content.

@davidcarlisle
Copy link
Member

davidcarlisle commented Jul 29, 2020

@joulev in the translations instructions we (currently) give the option of translating or not translating the examples. I think it depends on the community and how familiar a new latex user is likely to be with English. It does complicate our lives a bit but I think it's good to have the possibility. I am not sure for example which way the Japanese translation will go. We could ask @wtsnjp what his intentions are there....

@NiranjanTambe That said for the special case of extras-01 which (in the original at least) says that the examples come from the package documentation, it is probably best to leave the examples as they are.

@niruvt
Copy link
Contributor Author

niruvt commented Jul 30, 2020

@davidcarlisle

That extends the overleaf submisision to add marathi.sty (it may not be the latest version, you can check:-)

Done now! Thank you so much for helping me with this. I was worried whether my overleaf button will work or not.

I'll add the optional argument to the package name in the next release which will solve the lualatex problem too. (Thanks for the help.)

@joulev

As @davidcarlisle pointed out in his message translation instructions allow me to have Marathi examples "along with" the English ones. I am doing that only everywhere else. I changed the poetry example as it is absolutely unnatural in Marathi to write poems that way. Hence the example is completely un-relatable for us. Therefore I am changing it to a more practical one. I hope that sounds fine.

I suggest a mr/language-01 having a section showing the way that most Indian TeX users are using for Marathi in LaTeX.

This is a good idea. I would add a lesson about it as an alternative way of typesetting Marathi, but note that there is no standard way! I will add a method based on my knowledge only.

@josephwright

Indeed: as far as possible, the 'main thread' lessons should have the same content.

Yes. I would remove the changes that I have made to other examples, but I request you to at least consider the poetry example as an exception. That example is unpractical for not only Marathi users, but for many other non-English TeX-users.

@davidcarlisle
Copy link
Member

Thank you for working on learnlatex.org translations.
You may have seen already if watching the repository but just a note
to say that we have extended lesson-06 and more-06 to add descriptions
of defining commands with \newcommand and \NewDocumentCommand

463d181

@niruvt
Copy link
Contributor Author

niruvt commented Sep 25, 2020

Thanks @davidcarlisle,

I am stuck in some work and hence couldn't check the repository very actively. Hence it's good that you informed me about it here. Can you tell please tell me what is the correct way of adding these new changes to my local repository? I don't want to lose my work that has been already done, but also want new changes.

@davidcarlisle
Copy link
Member

@NiranjanTambe if you have checked in your local changes (git status -uno says you have no unsaved changes) then whatever happens you will not lose work you will be able to restore things from the repository

To resync your fork you can do

git fetch upstream
git checkout master
git merge upstream/master

the first two lines just pull the files into your local repository they will not affect your working directory at all.
The last line merges the files to your working directory so could in principle have some merge conflicts that need resolving, but as all your changes are in mr and no one else has made changes in there I do not think you should have issues.

The github site lets you generate diffs between any two versions if you want to see what has changed, see for example the link in the comment I gave above, but you could generate similar diff for the English versions of any files you have already translated, to check no major changes have been added.

@joulev
Copy link
Contributor

joulev commented Sep 25, 2020

@davidcarlisle I use

git pull https://github.com/learnlatex/learnlatex.github.io.git master

instead. It works, but is it better or worse than the commands you mentioned above?

@davidcarlisle
Copy link
Member

when you generated the fork at github originally github will have set up an "upstream" remote and an upstream/master branch being short names for the original learnlatex repository, so (I think) that referencing it explictly you end up with two local copies of that but to be honest I'm not sure, maybe git notices that they are the same thing so it makes no difference, git is good at noticing such things:-)

@niruvt
Copy link
Contributor Author

niruvt commented Sep 26, 2020

@davidcarlisle
On my machine I got this error for your first command.

git fetch upstream
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

@davidcarlisle
Copy link
Member

@NiranjanTambe yes sorry I may have mislead you, I did check one of my forks but maybe I had previously named the remote, I thought github did it when making the fork. I'll check the docs again and may edit that comment to save misleading any other readers.

@davidcarlisle
Copy link
Member

davidcarlisle commented Sep 26, 2020

@NiranjanTambe Sorry it seemed I had added this in the forks I had checked previously.
It seems that github doesn't make the remote on forks automatically, although many of its doc pages assume that there is a named remote, the above assumes that you have

git remote add upstream [email protected]:learnlatex/learnlatex.github.io.git

But it's just making upstream essentially an alias for what you did. Sorry for the confusion.

@niruvt
Copy link
Contributor Author

niruvt commented Sep 27, 2020

Thanks for this @davidcarlisle,
but this resulted in one error at the last command. Here is the log -

git merge upstream/master
Auto-merging _config.yml
CONFLICT (content): Merge conflict in _config.yml
Auto-merging AUTHORS.md
Automatic merge failed; fix conflicts and then commit the result.

@davidcarlisle
Copy link
Member

@NiranjanTambe that's probably OK, if you have adjusted the list of languages and list of authors and others have made similar changes in other branches there will be easy to fix merge conflicts there, just look in those files remove the >>> sections to make a correct list again and then commit the changed files.

If you complete the translation and want to merge it all back to learnlatex it's quite likely that I get merge conflicts in similar files, but I will just fix up th elist here to expose whatever lists of languages we want public at that time.

@davidcarlisle
Copy link
Member

@NiranjanTambe I haven't seen an official announcement yet, but Overleaf is now using Texlive 2020 for new projects and so includes marathi.sty. This means that you can delete the special version of the openinoverleaf function in mr/includes/buttons.js that uploaded a local copy to each project see

https://www.overleaf.com/read/chkkmrymnwsq

which has use of your package with no special configuration in the project.

@niruvt
Copy link
Contributor Author

niruvt commented Oct 6, 2020

Thanks for informing me about that. I will change the code in my local repository.

@davidcarlisle
Copy link
Member

Hi @NiranjanTambe I hope you are keeping well in these difficult times.

As you may have seen, the main site at learnlatex.org has been given a new design and some of the details of the language data have changed.

If you are still working on the translation, I have updated
https://www.learnlatex.org/TRANSLATIONS
to hopefully give correct instructions for the new layout, but if anything is not clear please ask

@niruvt
Copy link
Contributor Author

niruvt commented Feb 4, 2021

Hi @davidcarlisle

I am still interested in the translations. I made my old files compatible with the new design yesterday! I need more time for the translations, but till then I need to report some bugs that I found on the site. They are as follows.

(My website is available at - https://niranjantambe.github.io/learnlatex.github.io/mr/)

  1. Table of contents on the homepage doesn't show Marathi headings. I don't know from where it is taking the English headings. In my code I have followed the method used for the English lessons as far as I see. Kindly let me know if I have done something wrong there. Also this is not uniform. I can see this correctly in the table of contents, but not this one.
  2. I can't see the navigation icons which are correctly rendered in the other translations of the site. See the following screenshot.

Screenshot_2021-02-04_09-20-49

  1. Marathi translation of the website shall have Devanagari numerals instead of Arabic numerals. e.g. in the screenshot attached above, प्रकरण 1 should be प्रकरण १. If you want list of Devanagari numerals (ranging from 0-9) it is ०,१,२,३,४,५,६,७,८,९. Kindly help me in this matter. Auto-rendered numerals should be in Devanagari.

Thanks.

@niruvt
Copy link
Contributor Author

niruvt commented Feb 27, 2021

Thanks,

This translation is now merged in the master, so closing this issue. Kindly reopen it if any problems are found in the code.

@niruvt niruvt closed this as completed Feb 27, 2021
@davidcarlisle
Copy link
Member

@NiranjanTambe I just noticed (while checking something for Japanese) that

https://www.learnlatex.org/mr/lesson-11

the first paragraph seems to gave been missed and is still in English, it's just a couple of lines. If you could supply the text either as a PR or just add it here and I'll drop it in, thanks.

@davidcarlisle davidcarlisle reopened this Apr 27, 2021
@davidcarlisle
Copy link
Member

@NiranjanTambe in addition to the one paragraph of lesson-11, the whole of more-15 was missed in the orginal translation.

https://www.learnlatex.org/mr/more-15

Also, if possible, it would be nice to get translations for two new files that were added

https://www.learnlatex.org/mr/settings

and

https://www.learnlatex.org/mr/privacy

along with translations in translations.yml of the Settings and Privacy words that appear in navigational links on every page.

There is of course no rush or deadline, but as your translation is so nearly complete it would be nice to not have the english navigational elements.

Thanks for your work on this so far,

David

@niruvt
Copy link
Contributor Author

niruvt commented May 28, 2021

I am extremely sorry for the late response.

I saw your SE ping, but I was already trying to work on the translations. I am taking help from some friends of mine for some technical words, hence it is taking time. I will need some more time for completing the translations. I thought rather than pinging you again and again I'll just complete the translations and add them, but I am sorry for a long silence from my side. I'll work upon these files and add them soon.

Thanks

@davidcarlisle
Copy link
Member

davidcarlisle commented May 28, 2021 via email

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

No branches or pull requests

6 participants