From: Benoît Fontaine Date: Sat, 2 Feb 2019 18:44:45 +0000 (+0100) Subject: Revert "Merge pull request #9 from changeling/handle_ordinals" X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=fd3ec6a2d47ecdef7e7ed22101e409b83f1cad5f;p=gamesguru%2Fgetmyancestors.git Revert "Merge pull request #9 from changeling/handle_ordinals" This reverts commit 88e724d1b6d590af7dd4f7d91dbe4997bfd6a0a6, reversing changes made to 0a0a1035f9f4c4a985069f2a914851e630e84b50. --- diff --git a/README.md b/README.md index 6af254a..84e3894 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,7 @@ getmyancestors.py is a python3 script that downloads family trees in GEDCOM form This program is now in production phase, but bugs might still be present. Features will be added on request. It is provided as is. -The project is maintained at https://github.com/Linekio/getmyancestors. Visit here for the latest version and more information. - -This script requires python3, the requests module, and the num2words to work. To install the modules, run in your terminal: - -For requests: - -"python3 -m pip install requests" (or "python3 -m pip install --user requests" if you don't have admin rights on your machine). - -For num2words: - -"python3 -m pip install num2words" (or "python3 -m pip install --user num2words" if you don't have admin rights on your machine). +This script requires python3 and the requests module to work. To install this module on Linux, run in your terminal: "python3 -m pip install requests" (or "python3 -m pip install --user requests" if you don't have admin rights on your machine). This script requires python 3.4 (or higher) to run due to some novel features in the argparse and asyncio modules (https://docs.python.org/3/whatsnew/3.4.html) @@ -81,7 +71,7 @@ python3 getmyancestors.py -c -u username -p password -i LF7T-Y4C -o out.ged Support ======= -Send questions, suggestions, or feature requests to benoitfontaine.ba@gmail.com or giulio.genovese@gmail.com, or open an Issue at https://github.com/Linekio/getmyancestors/issues +Send questions, suggestions, or feature requests to benoitfontaine.ba@gmail.com or giulio.genovese@gmail.com Donation ======== diff --git a/fstogedcom.py b/fstogedcom.py index d5685a2..5be2d84 100644 --- a/fstogedcom.py +++ b/fstogedcom.py @@ -18,12 +18,6 @@ from getmyancestors import Session, Tree, Indi, Fam from mergemyancestors import Gedcom from translation import translations -try: - from num2words import num2words -except ImportError: - sys.stderr.write('You need to install the num2words module first\n') - sys.stderr.write('(run this in your terminal: "python3 -m pip install num2words" or "python3 -m pip install --user num2words")\n') - exit(2) tmp_dir = os.path.join(tempfile.gettempdir(), 'fstogedcom') global cache @@ -432,7 +426,7 @@ class Download(Frame): if not todo: break done |= todo - self.info(_('Download ') + num2words(i + 1, to='ordinal_num', lang=lang) + _(' generation of ancestors...')) + self.info(_('Download ') + str(i + 1) + _('th generation of ancestors...')) todo = self.tree.add_parents(todo) - done todo = set(self.tree.indi.keys()) @@ -441,7 +435,7 @@ class Download(Frame): if not todo: break done |= todo - self.info(_('Download ') + num2words(i + 1, to='ordinal_num', lang=lang) + _(' generation of descendants...')) + self.info(_('Download ') + str(i + 1) + _('th generation of descendants...')) todo = self.tree.add_children(todo) - done if self.options.spouses.get(): diff --git a/getmyancestors.py b/getmyancestors.py index 16a1a1d..092e8dc 100755 --- a/getmyancestors.py +++ b/getmyancestors.py @@ -33,13 +33,6 @@ import re # local import from translation import translations -try: - from num2words import num2words -except ImportError: - sys.stderr.write('You need to install the num2words module first\n') - sys.stderr.write('(run this in your terminal: "python3 -m pip install num2words" or "python3 -m pip install --user num2words")\n') - exit(2) - try: import requests except ImportError: @@ -952,7 +945,7 @@ if __name__ == '__main__': if not todo: break done |= todo - print(_('Download ') + num2words(i + 1, to='ordinal_num', lang=fs.lang) + _(' generation of ancestors...')) + print(_('Download ') + str(i + 1) + _('th generation of ancestors...')) todo = tree.add_parents(todo) - done # download descendants @@ -962,7 +955,7 @@ if __name__ == '__main__': if not todo: break done |= todo - print(_('Download ') + num2words(i + 1, to='ordinal_num', lang=fs.lang) + _(' generation of descendants...')) + print(_('Download ') + str(i + 1) + _('th generation of descendants...')) todo = tree.add_children(todo) - done # download spouses diff --git a/translation.py b/translation.py index 9b4434c..1ca6789 100644 --- a/translation.py +++ b/translation.py @@ -101,11 +101,11 @@ translations = { 'Download starting individuals...': { 'fr': 'Téléchargement des personnes de départ...', }, - ' generation of ancestors...': { - 'fr': ' génération d\'ancêtres...', + 'th generation of ancestors...': { + 'fr': 'e génération d\'ancêtres...', }, - ' generation of descendants...': { - 'fr': ' génération de descendants...', + 'th generation of descendants...': { + 'fr': 'e génération de descendants...', }, 'Download spouses and marriage information...': { 'fr': 'Téléchargement des conjoints et des informations de mariage...',