Skip to content

Commit

Permalink
دستاویزات
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Jan 4, 2019
1 parent 9012b11 commit 9ed2288
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 15 deletions.
5 changes: 3 additions & 2 deletions امتحان/test_ناسا.py
@@ -1,4 +1,5 @@
import unittest
from json import JSONDecodeError

import pandas as pd
import pandas.testing as pdt
Expand All @@ -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
وجہ = 'ناسا کا جالبین پنہ اب دستیاب نہیں۔'

Expand Down
9 changes: 7 additions & 2 deletions تقدیر/ذرائع/ناسا.py
@@ -1,6 +1,7 @@
from json import JSONDecodeError

import pandas as pd
from pcse.db import NASAPowerWeatherDataProvider

from تقدیر import متاغیرات
from تقدیر.ذریعہ import ذریعہ

Expand All @@ -9,8 +10,12 @@ class ناسا(ذریعہ):
"""
یہ ذریعہ ناسا کے `پنے <https://power.larc.nasa.gov/cgi-bin/v1/DataAccess.py>`_ سے آوہوا مشاہدات کے کوائف پاتا ہیے۔
"""

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, تک)
Expand Down
54 changes: 45 additions & 9 deletions دستاویزات/.tx/config
Expand Up @@ -7,6 +7,12 @@ source_file = build/gettext/shukriya.pot
source_lang = en
type = PO

[tqdyr.malumat]
file_filter = source/_locale/<lang>/LC_MESSAGES/malumat.po
source_file = build/gettext/malumat.pot
source_lang = en
type = PO

[tqdyr.shuruat]
file_filter = source/_locale/<lang>/LC_MESSAGES/shuruat.po
source_file = build/gettext/shuruat.pot
Expand All @@ -25,21 +31,51 @@ source_file = build/gettext/trqi/nae_zrae.pot
source_lang = en
type = PO

[tqdyr.nmune--mshahdat]
file_filter = source/_locale/<lang>/LC_MESSAGES/nmune/mshahdat.po
source_file = build/gettext/nmune/mshahdat.pot
[tqdyr.trqi--trjmh]
file_filter = source/_locale/<lang>/LC_MESSAGES/trqi/trjmh.po
source_file = build/gettext/trqi/trjmh.pot
source_lang = en
type = PO

[tqdyr.malumat]
file_filter = source/_locale/<lang>/LC_MESSAGES/malumat.po
source_file = build/gettext/malumat.pot
[tqdyr.moajh--moajh]
file_filter = source/_locale/<lang>/LC_MESSAGES/moajh/moajh.po
source_file = build/gettext/moajh/moajh.pot
source_lang = en
type = PO

[tqdyr.trqi--trjmh]
file_filter = source/_locale/<lang>/LC_MESSAGES/trqi/trjmh.po
source_file = build/gettext/trqi/trjmh.pot
[tqdyr.moajh--koaef]
file_filter = source/_locale/<lang>/LC_MESSAGES/moajh/koaef.po
source_file = build/gettext/moajh/koaef.pot
source_lang = en
type = PO

[tqdyr.moajh--mqam]
file_filter = source/_locale/<lang>/LC_MESSAGES/moajh/mqam.po
source_file = build/gettext/moajh/mqam.pot
source_lang = en
type = PO

[tqdyr.moajh--zriya]
file_filter = source/_locale/<lang>/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/<lang>/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/<lang>/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/<lang>/LC_MESSAGES/nmune/mshahdat.po
source_file = build/gettext/nmune/mshahdat.pot
source_lang = en
type = PO

Expand Down
7 changes: 5 additions & 2 deletions دستاویزات/.tx/tx.sh
Expand Up @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 9ed2288

Please sign in to comment.