Revert "Merge pull request #9 from changeling/handle_ordinals"
authorBenoît Fontaine <benoitfontaine.ba@gmail.com>
Sat, 2 Feb 2019 18:44:45 +0000 (19:44 +0100)
committerBenoît Fontaine <benoitfontaine.ba@gmail.com>
Sat, 2 Feb 2019 18:44:45 +0000 (19:44 +0100)
This reverts commit 88e724d1b6d590af7dd4f7d91dbe4997bfd6a0a6, reversing
changes made to 0a0a1035f9f4c4a985069f2a914851e630e84b50.

README.md
fstogedcom.py
getmyancestors.py
translation.py

index 6af254a4adfafc38e385d8821fc14a2f0b359679..84e3894a8e509a6e5da1a3a702fcf4ff68d52869 100644 (file)
--- 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
 ========
index d5685a20ad7b7f836afbba3ac2b07ecfe56a089f..5be2d84da797a7c40cb4b84bb98c04575461fe81 100644 (file)
@@ -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():
index 16a1a1daa997a484b5026cbfdb572a7ba370a07d..092e8dc5d630d7b8bad8f17b94f0e11fa4e57125 100755 (executable)
@@ -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
index 9b4434c7f25fd94b99501f93fa5df6d13427b479..1ca6789f519b025035e1924be9a5950b45abaa53 100644 (file)
@@ -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...',