From 9ed22885ec421360f36fb228e480df5f36bc5e59 Mon Sep 17 00:00:00 2001 From: julienmalard Date: Fri, 4 Jan 2019 12:15:47 -0500 Subject: [PATCH] =?UTF-8?q?=D8=AF=D8=B3=D8=AA=D8=A7=D9=88=DB=8C=D8=B2?= =?UTF-8?q?=D8=A7=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test_\331\206\330\247\330\263\330\247.py" | 5 +- .../\331\206\330\247\330\263\330\247.py" | 9 +++- .../.tx/config" | 54 +++++++++++++++---- .../.tx/tx.sh" | 7 ++- .../source/moajh/koaef.rst" | 0 .../source/moajh/moajh.rst" | 0 .../source/moajh/mqam.rst" | 0 .../source/moajh/zrae/zrae.rst" | 0 .../source/moajh/zrae/zriya_nukta.rst" | 0 .../source/moajh/zriya.rst" | 0 10 files changed, 60 insertions(+), 15 deletions(-) rename "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\332\251\331\210\330\247\330\246\331\201.rst" => "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/koaef.rst" (100%) rename "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\331\205\331\210\330\247\330\254\333\201.rst" => "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/moajh.rst" (100%) rename "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\331\205\331\202\330\247\331\205.rst" => "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/mqam.rst" (100%) rename "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\330\247\330\246\330\271/\330\260\330\261\330\247\330\246\330\271.rst" => "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zrae/zrae.rst" (100%) rename "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\330\247\330\246\330\271/\330\260\330\261\333\214\330\271\333\201_\331\206\332\251\330\252\333\201.rst" => "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zrae/zriya_nukta.rst" (100%) rename "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\333\214\330\271\333\201.rst" => "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zriya.rst" (100%) diff --git "a/\330\247\331\205\330\252\330\255\330\247\331\206/test_\331\206\330\247\330\263\330\247.py" "b/\330\247\331\205\330\252\330\255\330\247\331\206/test_\331\206\330\247\330\263\330\247.py" index c3bd8a71..99ecd829 100644 --- "a/\330\247\331\205\330\252\330\255\330\247\331\206/test_\331\206\330\247\330\263\330\247.py" +++ "b/\330\247\331\205\330\252\330\255\330\247\331\206/test_\331\206\330\247\330\263\330\247.py" @@ -1,4 +1,5 @@ import unittest +from json import JSONDecodeError import pandas as pd import pandas.testing as pdt @@ -9,8 +10,8 @@ جگہ = dict(چوڑائی=11.02, طول=76.96, بلندی=1) try: NASAPowerWeatherDataProvider(latitude=جگہ['چوڑائی'], longitude=جگہ['طول'], force_update=False) - جالبینی_رسائی=True -except (requests.exceptions.ConnectionError, KeyError): + جالبینی_رسائی = True +except (requests.exceptions.ConnectionError, KeyError, JSONDecodeError): جالبینی_رسائی = False وجہ = 'ناسا کا جالبین پنہ اب دستیاب نہیں۔' diff --git "a/\330\252\331\202\330\257\333\214\330\261/\330\260\330\261\330\247\330\246\330\271/\331\206\330\247\330\263\330\247.py" "b/\330\252\331\202\330\257\333\214\330\261/\330\260\330\261\330\247\330\246\330\271/\331\206\330\247\330\263\330\247.py" index 22a8fc44..21b5ebb1 100644 --- "a/\330\252\331\202\330\257\333\214\330\261/\330\260\330\261\330\247\330\246\330\271/\331\206\330\247\330\263\330\247.py" +++ "b/\330\252\331\202\330\257\333\214\330\261/\330\260\330\261\330\247\330\246\330\271/\331\206\330\247\330\263\330\247.py" @@ -1,6 +1,7 @@ +from json import JSONDecodeError + import pandas as pd from pcse.db import NASAPowerWeatherDataProvider - from تقدیر import متاغیرات from تقدیر.ذریعہ import ذریعہ @@ -9,8 +10,12 @@ class ناسا(ذریعہ): """ یہ ذریعہ ناسا کے `پنے `_ سے آوہوا مشاہدات کے کوائف پاتا ہیے۔ """ + def _کوائف_بنانا(خود, سے, تک, چوڑائی, طول, بلندی, خاکے): - ذریعہ_ناسا = NASAPowerWeatherDataProvider(latitude=چوڑائی, longitude=طول, force_update=False) + try: + ذریعہ_ناسا = NASAPowerWeatherDataProvider(latitude=چوڑائی, longitude=طول, force_update=False) + except (requests.exceptions.ConnectionError, KeyError, JSONDecodeError): + return سے = max(ذریعہ_ناسا.first_date, سے) تک = min(ذریعہ_ناسا.last_date, تک) diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/config" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/config" index 68408566..31a2d1d5 100644 --- "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/config" +++ "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/config" @@ -7,6 +7,12 @@ source_file = build/gettext/shukriya.pot source_lang = en type = PO +[tqdyr.malumat] +file_filter = source/_locale//LC_MESSAGES/malumat.po +source_file = build/gettext/malumat.pot +source_lang = en +type = PO + [tqdyr.shuruat] file_filter = source/_locale//LC_MESSAGES/shuruat.po source_file = build/gettext/shuruat.pot @@ -25,21 +31,51 @@ source_file = build/gettext/trqi/nae_zrae.pot source_lang = en type = PO -[tqdyr.nmune--mshahdat] -file_filter = source/_locale//LC_MESSAGES/nmune/mshahdat.po -source_file = build/gettext/nmune/mshahdat.pot +[tqdyr.trqi--trjmh] +file_filter = source/_locale//LC_MESSAGES/trqi/trjmh.po +source_file = build/gettext/trqi/trjmh.pot source_lang = en type = PO -[tqdyr.malumat] -file_filter = source/_locale//LC_MESSAGES/malumat.po -source_file = build/gettext/malumat.pot +[tqdyr.moajh--moajh] +file_filter = source/_locale//LC_MESSAGES/moajh/moajh.po +source_file = build/gettext/moajh/moajh.pot source_lang = en type = PO -[tqdyr.trqi--trjmh] -file_filter = source/_locale//LC_MESSAGES/trqi/trjmh.po -source_file = build/gettext/trqi/trjmh.pot +[tqdyr.moajh--koaef] +file_filter = source/_locale//LC_MESSAGES/moajh/koaef.po +source_file = build/gettext/moajh/koaef.pot +source_lang = en +type = PO + +[tqdyr.moajh--mqam] +file_filter = source/_locale//LC_MESSAGES/moajh/mqam.po +source_file = build/gettext/moajh/mqam.pot +source_lang = en +type = PO + +[tqdyr.moajh--zriya] +file_filter = source/_locale//LC_MESSAGES/moajh/zriya.po +source_file = build/gettext/moajh/zriya.pot +source_lang = en +type = PO + +[tqdyr.moajh--zrae--zriya_nukta] +file_filter = source/_locale//LC_MESSAGES/moajh/zrae/zriya_nukta.po +source_file = build/gettext/moajh/zrae/zriya_nukta.pot +source_lang = en +type = PO + +[tqdyr.moajh--zrae--zrae] +file_filter = source/_locale//LC_MESSAGES/moajh/zrae/zrae.po +source_file = build/gettext/moajh/zrae/zrae.pot +source_lang = en +type = PO + +[tqdyr.nmune--mshahdat] +file_filter = source/_locale//LC_MESSAGES/nmune/mshahdat.po +source_file = build/gettext/nmune/mshahdat.pot source_lang = en type = PO diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/tx.sh" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/tx.sh" index 44e7a8e7..a011bb2d 100644 --- "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/tx.sh" +++ "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/.tx/tx.sh" @@ -29,7 +29,9 @@ token =" > ~/.transifexrc update_translations() { make gettext - sphinx-intl update-txconfig-resources + rm .tx/config + sphinx-intl create-txconfig + sphinx-intl update-txconfig-resources --transifex-project-name tqdyr sphinx-intl update -p build/gettext } @@ -53,7 +55,8 @@ tx_pull() { tx_init tx pull --all --force FRESH_TRANSLATIONS=$(git diff-index --name-only HEAD --) - if [ -n $FRESH_TRANSLATIONS ] + + if [ "$TX_COMMIT_TRANSLATIONS" = true ] && [ -n $FRESH_TRANSLATIONS ] then echo "pushing" git_setup diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\332\251\331\210\330\247\330\246\331\201.rst" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/koaef.rst" similarity index 100% rename from "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\332\251\331\210\330\247\330\246\331\201.rst" rename to "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/koaef.rst" diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\331\205\331\210\330\247\330\254\333\201.rst" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/moajh.rst" similarity index 100% rename from "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\331\205\331\210\330\247\330\254\333\201.rst" rename to "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/moajh.rst" diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\331\205\331\202\330\247\331\205.rst" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/mqam.rst" similarity index 100% rename from "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\331\205\331\202\330\247\331\205.rst" rename to "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/mqam.rst" diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\330\247\330\246\330\271/\330\260\330\261\330\247\330\246\330\271.rst" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zrae/zrae.rst" similarity index 100% rename from "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\330\247\330\246\330\271/\330\260\330\261\330\247\330\246\330\271.rst" rename to "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zrae/zrae.rst" diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\330\247\330\246\330\271/\330\260\330\261\333\214\330\271\333\201_\331\206\332\251\330\252\333\201.rst" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zrae/zriya_nukta.rst" similarity index 100% rename from "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\330\247\330\246\330\271/\330\260\330\261\333\214\330\271\333\201_\331\206\332\251\330\252\333\201.rst" rename to "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zrae/zriya_nukta.rst" diff --git "a/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\333\214\330\271\333\201.rst" "b/\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zriya.rst" similarity index 100% rename from "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/\331\205\331\210\330\247\330\254\333\201/\330\260\330\261\333\214\330\271\333\201.rst" rename to "\330\257\330\263\330\252\330\247\331\210\333\214\330\262\330\247\330\252/source/moajh/zriya.rst"