diff --git a/INSTALL.py b/INSTALL.py index 494d2ca..7716b6f 100755 --- a/INSTALL.py +++ b/INSTALL.py @@ -14,43 +14,51 @@ import urllib.request import tarfile import random +import gettext +try: + T = gettext.translation('pkgbuilder', 'locale') # for installer + def _(message): + """gettext""" + out = T.lgettext(message) + return out.decode() -print("""Hello! + + print(_("""Hello! PKGBUILDer is now available as an AUR package. It is the suggested way of installing PKGBUILDer. This script will download the AUR package and install it. If you will have problems, please download and compile the package manually. -""") +""")) -WHOCARES = input('Hit Enter/Return to continue. ') -print('') + WHOCARES = input(_('Hit Enter/Return to continue. ')) + print('') -UID = os.geteuid() -PATH = '/tmp/pkgbuilderinstall-{0}'.format(random.randint(1, 100)) -if os.path.exists(PATH) == False: - os.mkdir(PATH) -os.chdir(PATH) + UID = os.geteuid() + PATH = '/tmp/pkgbuilderinstall-{0}'.format(random.randint(1, 100)) + if os.path.exists(PATH) == False: + os.mkdir(PATH) + os.chdir(PATH) -PKGDATA = json.loads(urllib.request.urlopen('http://aur.archlinux.org\ + PKGDATA = json.loads(urllib.request.urlopen('http://aur.archlinux.org\ /rpc.php?type=info&arg=pkgbuilder').read().decode()) -RHANDLE = urllib.request.urlopen('http://aur.archlinux.org'+ -PKGDATA['results']['URLPath']) -open('pkgbuilder.tar.gz', 'wb').write(RHANDLE.read()) -THANDLE = tarfile.open('pkgbuilder.tar.gz', 'r:gz') -THANDLE.extractall() -os.chdir('./pkgbuilder/') + RHANDLE = urllib.request.urlopen('http://aur.archlinux.org'+ + PKGDATA['results']['URLPath']) + open('pkgbuilder.tar.gz', 'wb').write(RHANDLE.read()) + THANDLE = tarfile.open('pkgbuilder.tar.gz', 'r:gz') + THANDLE.extractall() + os.chdir('./pkgbuilder/') -ASROOT = '' -if os.geteuid() == 0: - ASROOT = ' --asroot' -MPKG = subprocess.call('/usr/bin/makepkg -si'+ASROOT, shell=True) + ASROOT = '' + if os.geteuid() == 0: + ASROOT = ' --asroot' + MPKG = subprocess.call('/usr/bin/makepkg -si'+ASROOT, shell=True) -if MPKG == 1: - print(""" + if MPKG == 1: + print(_(""" Something went wrong. Please read makepkg's output and try again. You can also try to debug the work of this script yourself. @@ -59,9 +67,9 @@ (the number is random). If I am wrong, though, congratulations! -""".format(PATH)) +""").format(PATH)) -print(""" + print(_(""" Read the above output. If the script had any problems, run it again. You can also try to debug the work of this script yourself. @@ -73,4 +81,13 @@ PKGBUILDer. For standalone usage, type `pkgbuilder` into the prompt (zsh users: hash -r, other shells may need another command). For python module usage, type `import pkgbuilder` into the python prompt. -""".format(PATH)) +""").format(PATH)) + +except KeyboardInterrupt: + print(_("""It looks like you want to quit. Okay then, goodbye. +All the files this script was working on are placed in + {0} +(the number is random). + +If that's what you want to do, go for it. If it isn't, run this +script again.""").format(PATH)) diff --git a/PKGBUILD b/PKGBUILD index b86a4d68..c1f1179 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Kwpolska pkgname=pkgbuilder -pkgver=2.1.1.3 +pkgver=2.1.1.4 pkgrel=1 pkgdesc="A basic Python AUR helper/library." arch=('any') @@ -9,7 +9,7 @@ license=('BSD') depends=('python' 'pyalpm' 'python-pyparsing') options=(!emptydirs) source=("http://pypi.python.org/packages/source/p/${pkgname}/${pkgname}-${pkgver}.tar.gz") -md5sums=('82b4e53c06518dae8956ad8f794340f6') +md5sums=('ec736fd27ef32409bff87c4e3689e400') package() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/dist/pkgbuilder-2.1.1.4.tar.gz b/dist/pkgbuilder-2.1.1.4.tar.gz new file mode 100644 index 0000000..2cbc1ea Binary files /dev/null and b/dist/pkgbuilder-2.1.1.4.tar.gz differ diff --git a/docs/README.rst b/docs/README.rst index f715e2c..4f64619 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -3,8 +3,8 @@ README for PKGBUILDer ===================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2011-10-04 -:Version: 2.1.1.3 +:Date: 2011-10-07 +:Version: 2.1.1.4 PKGBUILDer. A Python AUR helper/library. ========================================= diff --git a/docs/_build/doctrees/README.doctree b/docs/_build/doctrees/README.doctree index 1cfb6bf..3118eef 100644 Binary files a/docs/_build/doctrees/README.doctree and b/docs/_build/doctrees/README.doctree differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 3d2e821..a6e2201 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index cd9c316..6bb5074 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/messagecodes.doctree b/docs/_build/doctrees/messagecodes.doctree index edd7a0c..e089d84 100644 Binary files a/docs/_build/doctrees/messagecodes.doctree and b/docs/_build/doctrees/messagecodes.doctree differ diff --git a/docs/_build/doctrees/pkgbuilder.doctree b/docs/_build/doctrees/pkgbuilder.doctree index 97e5ad3..13466fd 100644 Binary files a/docs/_build/doctrees/pkgbuilder.doctree and b/docs/_build/doctrees/pkgbuilder.doctree differ diff --git a/docs/conf.py b/docs/conf.py index 15ea69e..0455ee7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,7 @@ # The short X.Y version. version = '2.1' # The full version, including alpha/beta/rc tags. -release = '2.1.1.3' +release = '2.1.1.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/docs-pkgbuilder.zip b/docs/docs-pkgbuilder.zip index d750c9a..cf64932 100644 Binary files a/docs/docs-pkgbuilder.zip and b/docs/docs-pkgbuilder.zip differ diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo index 2b6ada1..03cf18c 100644 --- a/docs/html/.buildinfo +++ b/docs/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b980e1a36903d7b6497827440dd27e80 +config: c9c79e042c09e334f7c8639f0394c227 tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/docs/html/README/index.html b/docs/html/README/index.html index e1f752c..5342d38 100644 --- a/docs/html/README/index.html +++ b/docs/html/README/index.html @@ -7,13 +7,13 @@ - README for PKGBUILDer — PKGBUILDer v2.1.1.3 documentation + README for PKGBUILDer — PKGBUILDer v2.1.1.4 documentation - + @@ -36,7 +36,7 @@

Navigation

  • previous |
  • -
  • PKGBUILDer v2.1.1.3 documentation »
  • +
  • PKGBUILDer v2.1.1.4 documentation »
  • @@ -55,9 +55,9 @@

    README for PKGBUILDer Author:Kwpolska <kwpolska@kwpolska.tk> -Date:2011-10-04 +Date:2011-10-07 -Version:2.1.1.3 +Version:2.1.1.4 @@ -167,12 +167,12 @@

    Navigation

  • previous |
  • -
  • PKGBUILDer v2.1.1.3 documentation »
  • +
  • PKGBUILDer v2.1.1.4 documentation »
  • diff --git a/docs/html/_sources/README.txt b/docs/html/_sources/README.txt index f715e2c..4f64619 100644 --- a/docs/html/_sources/README.txt +++ b/docs/html/_sources/README.txt @@ -3,8 +3,8 @@ README for PKGBUILDer ===================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2011-10-04 -:Version: 2.1.1.3 +:Date: 2011-10-07 +:Version: 2.1.1.4 PKGBUILDer. A Python AUR helper/library. ========================================= diff --git a/docs/html/_sources/index.txt b/docs/html/_sources/index.txt index 2442e2a..426b88b 100644 --- a/docs/html/_sources/index.txt +++ b/docs/html/_sources/index.txt @@ -3,7 +3,7 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -PKGBUILDer 2.1.1.3 documentation +PKGBUILDer 2.1.1.4 documentation ================================ Contents: diff --git a/docs/html/_sources/messagecodes.txt b/docs/html/_sources/messagecodes.txt index b2fda91..8618887 100644 --- a/docs/html/_sources/messagecodes.txt +++ b/docs/html/_sources/messagecodes.txt @@ -3,8 +3,8 @@ Appendix B. PKGBUILDer message numbers list =========================================== :Info: This is an appendix to the PKGBUILDer documentation. :Author: Kwpolska -:Date: 2011-10-04 -:Version: 2.1.1.3 +:Date: 2011-10-07 +:Version: 2.1.1.4 In order to help debugging, messages are numbered. Each message number has four digits: the first one is the @@ -29,7 +29,7 @@ Usage instructions In order to get the category identifier, you need to: * multiply the desired list element by 1000 - * multiply the desired subelement by 100 + * multiply the desired subelement (if any) by 100 * add the results together In order to get the first possible number of this (sub)category, add 1 to @@ -63,6 +63,7 @@ Errors ======== =============== ========================================= ERR# Component Message ======== =============== ========================================= +[3001]_ build_runner package not found [3101]_ download 0 bytes downloaded [3151]_ extract 0 files extracted [3201]_ depcheck cannot find the requested dependency @@ -76,6 +77,9 @@ ERR# Component Message Explainations: +.. [3001] occurs, when PKGBUILDer cannot find the requested package. + The name is probably mispelled or the package was deleted. + .. [3101] occurs, when PKGBUILDer downloaded 0 bytes. It usually means that something bad happened during the download. diff --git a/docs/html/_sources/pkgbuilder.txt b/docs/html/_sources/pkgbuilder.txt index 16da256..3146460 100644 --- a/docs/html/_sources/pkgbuilder.txt +++ b/docs/html/_sources/pkgbuilder.txt @@ -8,8 +8,8 @@ a Python AUR helper/library :Author: Kwpolska :Copyright: This document has been placed in the public domain. -:Date: 2011-10-04 -:Version: 2.1.1.3 +:Date: 2011-10-07 +:Version: 2.1.1.4 :Manual section: 8 :Manual group: PKGBUILDer manual diff --git a/docs/html/index.html b/docs/html/index.html index dc1ca87..71c5fed 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -7,13 +7,13 @@ - PKGBUILDer 2.1.1.3 documentation — PKGBUILDer v2.1.1.3 documentation + PKGBUILDer 2.1.1.4 documentation — PKGBUILDer v2.1.1.4 documentation - + @@ -32,7 +32,7 @@

    Navigation

  • next
  • -
  • PKGBUILDer v2.1.1.3 documentation »
  • +
  • PKGBUILDer v2.1.1.4 documentation »
  • @@ -41,8 +41,8 @@

    Navigation

    -
    -

    PKGBUILDer 2.1.1.3 documentation

    +
    +

    PKGBUILDer 2.1.1.4 documentation

    Contents:

    diff --git a/docs/html/messagecodes/index.html b/docs/html/messagecodes/index.html index 23ebe87..8db4698 100644 --- a/docs/html/messagecodes/index.html +++ b/docs/html/messagecodes/index.html @@ -7,13 +7,13 @@ - Appendix B. PKGBUILDer message numbers list — PKGBUILDer v2.1.1.3 documentation + Appendix B. PKGBUILDer message numbers list — PKGBUILDer v2.1.1.4 documentation - + @@ -32,7 +32,7 @@

    Navigation

  • previous
  • -
  • PKGBUILDer v2.1.1.3 documentation »
  • +
  • PKGBUILDer v2.1.1.4 documentation »
  • @@ -51,9 +51,9 @@

    Appendix B. PKGBUILDer message numbers listAuthor:Kwpolska <kwpolska@kwpolska.tk> -Date:2011-10-04 +Date:2011-10-07 -Version:2.1.1.3 +Version:2.1.1.4 @@ -89,7 +89,7 @@

    Usage instructions
  • multiply the desired list element by 1000
  • -
  • multiply the desired subelement by 100
  • +
  • multiply the desired subelement (if any) by 100
  • add the results together
  • @@ -163,72 +163,83 @@

    Errors -[3101] +[3001] +build_runner +package not found + +[3101] download 0 bytes downloaded -[3151] +[3151] extract 0 files extracted -[3201] +[3201] depcheck cannot find the requested dependency -[3202] +[3202] depcheck UnicodeDecodeError while reading file -[3301] +[3301] makepkg returned 1 -[3401] +[3401] auto_build AUR dependency required -[3451] +[3451] validation not installed -[3452] +[3452] validation outdated -[5002] +[5002] search search string too short

    Explainations:

    - +
    - + +
    [3101]occurs, when PKGBUILDer downloaded 0 bytes. It usually +
    [3001]occurs, when PKGBUILDer cannot find the requested package. +The name is probably mispelled or the package was deleted.
    + + + +
    [3101]occurs, when PKGBUILDer downloaded 0 bytes. It usually means that something bad happened during the download.
    - +
    -
    [3151]occurs, when PKGBUILDer extracted 0 files from the +
    [3151]occurs, when PKGBUILDer extracted 0 files from the downloaded tarball. It means that the tarball is broken. Please tell the maintainer about this problem.
    - +
    -
    [3201]occurs, when the $depends or $makedepends array of the +
    [3201]occurs, when the $depends or $makedepends array of the PKGBUILD requests a package, that does not exist in the system, repositories, nor the AUR.
    - +
    -
    [3202]occurs, when Python cannot decode UTF-8 the PKGBUILD. If +
    [3202]occurs, when Python cannot decode UTF-8 the PKGBUILD. If the PKGBUILD cannot be read, dependency checks cannot be performed. Possible reasons include incorrectly encoded characters in the Maintainer/Submitter field. Please inform the package maintainer @@ -238,46 +249,46 @@

    Errors + -
    [3301]occurs, when makepkg exits with the return code 1. It means +
    [3301]occurs, when makepkg exits with the return code 1. It means that something bad happened. Refer to makepkg’s output for more info.
    - +
    -
    [3401]occurs, when the $depends or $makedepends array of the +
    [3401]occurs, when the $depends or $makedepends array of the PKGBUILD request a package, which exists in the AUR. It is plain informational. Right after displaying this message, the script will automatically build the required packages.
    - +
    -
    [3451]occurs, when PKGBUILDer finds out that the package is not +
    [3451]occurs, when PKGBUILDer finds out that the package is not installed on your system. It means that the package that was bulit before this message was issued wasn’t installed properly (eg. root password wasn’t provided at the right time, ‘n’ was hit when pacman was asking for proceeding).
    - +
    -
    [3452]occurs, when PKGBUILDer finds out that the package is +
    [3452]occurs, when PKGBUILDer finds out that the package is installed, but outdated. It means that the package that was bulit before this message was issued wasn’t installed properly (eg. root password wasn’t provided at the right time, ‘n’ was hit when pacman was asking for proceeding).
    - +
    - @@ -331,12 +342,12 @@

    Navigation

  • previous
  • -
  • PKGBUILDer v2.1.1.3 documentation »
  • +
  • PKGBUILDer v2.1.1.4 documentation »
  • diff --git a/docs/html/pkgbuilder/index.html b/docs/html/pkgbuilder/index.html index 33f336d..2cfa343 100644 --- a/docs/html/pkgbuilder/index.html +++ b/docs/html/pkgbuilder/index.html @@ -7,13 +7,13 @@ - PKGBUILDer — PKGBUILDer v2.1.1.3 documentation + PKGBUILDer — PKGBUILDer v2.1.1.4 documentation - + - + @@ -57,9 +57,9 @@

    a Python AUR helper/library

    - + - + @@ -178,7 +178,7 @@

    Table Of Contents

    Previous topic

    PKGBUILDer 2.1.1.3 documentation

    + title="previous chapter">PKGBUILDer 2.1.1.4 documentation

    Next topic

    README for PKGBUILDer

    @@ -206,14 +206,14 @@

    Navigation

    next
  • - previous |
  • -
  • PKGBUILDer v2.1.1.3 documentation »
  • +
  • PKGBUILDer v2.1.1.4 documentation »
  • diff --git a/docs/html/search/index.html b/docs/html/search/index.html index 34bf5e2..c795ac8 100644 --- a/docs/html/search/index.html +++ b/docs/html/search/index.html @@ -7,13 +7,13 @@ - Search — PKGBUILDer v2.1.1.3 documentation + Search — PKGBUILDer v2.1.1.4 documentation - + @@ -34,7 +34,7 @@ @@ -79,12 +79,12 @@

    Search

    diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js index e0e2161..7a9c622 100644 --- a/docs/html/searchindex.js +++ b/docs/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:0,code:[0,3,2],queri:2,four:3,follow:[0,2],categori:[1,2,3],iconv:3,procur:0,depend:3,friendli:2,send:2,aur:[0,1,2,3],skip:2,aris:0,neglig:0,introduc:0,merchant:0,digit:3,sourc:0,string:3,util:3,exact:3,err:3,list:[0,1,3],pleas:3,impli:0,direct:0,maintain:[3,2],download:3,compat:[0,2],sub:3,section:2,calcul:3,current:2,version:[0,3,2],"new":0,order:3,"public":2,deriv:0,disclaim:0,met:0,modif:0,sinc:2,search:[3,2],prior:0,permit:0,extra:0,modul:[3,2],api:3,instal:[0,3,2],from:[0,3,2],proceed:3,visit:2,perl:0,usr:0,tell:3,more:[0,3,2],desir:3,notic:0,warn:[1,3],appendix:[1,3],particular:0,must:0,none:3,pkgbuild:3,pyalpm:0,work:2,subel:3,can:2,purpos:0,root:3,process:2,accept:2,tarbal:3,occur:3,instead:2,updat:[3,2],product:0,after:3,befor:3,mai:0,data:0,man:0,"short":3,author:[0,3,2],element:3,caus:0,inform:[1,3],bulit:3,juan:3,oper:2,help:3,softwar:0,consent:0,through:3,paramet:[0,2],conjunct:2,group:2,fit:0,makepkg:[3,2],tort:0,mail:2,non:3,good:0,"return":3,thei:2,python:[0,1,2,3],interrupt:0,now:[0,2],nor:[0,3],name:[0,2],auto_build:3,refresh:2,each:3,debug:3,found:[3,2],mean:3,domain:2,vote:2,redistribut:0,happen:3,extract:3,event:0,special:[0,2],out:[0,3,2],shown:3,profit:0,content:1,cwd:2,reason:3,theori:0,ask:3,"byte":3,place:2,retain:0,first:[3,2],origin:[0,2],endors:0,arrai:3,number:[1,3],predepcheck:3,date:[0,3,2],instruct:3,wrapper:[0,2],wasn:3,owner:[0,2],stabl:0,script:[3,2],licens:2,system:3,messag:[1,3],too:3,illeg:3,option:2,copi:0,sync:2,github:2,holder:0,than:3,target:2,provid:[0,3,2],charact:3,posit:3,sai:2,ani:0,packag:[0,3,2],substitut:0,need:[0,3],issu:[3,2],built:2,note:0,also:[3,2],without:0,build:[0,3,2],which:[3,2],noth:3,even:0,distribut:0,shall:[0,2],multipli:3,letter:3,phase:2,"class":3,url:2,doc:0,request:3,doe:3,syntax:2,find:3,copyright:[0,2],explain:3,busi:0,meant:3,hit:3,variou:2,get:3,express:0,pypi:0,repo:2,cannot:3,report:2,liabl:0,requir:3,bad:3,see:2,result:3,reserv:0,correctli:3,someth:3,written:0,pkgbuilder:[0,1,2,3],neither:0,incident:0,last:2,howev:[0,3],contract:0,mani:0,com:2,comment:3,kwpolska:[0,3,2],color:2,exemplari:0,damag:0,liabil:0,addition:2,three:3,been:2,compon:3,much:2,consequenti:0,piconv:3,togeth:3,plain:3,servic:0,"while":3,abov:[0,3],error:[1,3],helper:[0,1,2],readm:[0,1],them:2,synopsi:2,incorrectli:3,perform:3,make:2,shorter:3,binari:0,html:0,decod:3,document:[0,1,2,3],http:2,depcheck:3,user:2,syu:2,techniqu:2,exampl:[3,2],thi:[0,3,2],usual:3,identifi:3,yet:3,add:[0,3],valid:[3,2],input:3,match:3,bin:0,applic:2,advis:0,format:2,read:3,big:0,password:3,python3:0,loss:0,specif:0,makedepend:3,manual:2,nocolor:2,output:3,page:[0,2],right:[0,3],indirect:0,librari:[0,1,2],tmp:2,leap:0,exit:3,condit:0,reproduc:0,thhe:2,refer:[0,3],usag:3,broken:3,promot:0,repositori:3,about:[3,2],materi:0,submitt:3,encod:3,automat:[3,2],warranti:0,contributor:0,your:3,git:2,wai:0,submit:2,avail:0,strict:0,includ:[0,3],forward:0,properli:3,form:0,offer:2,forc:2,bug:2,info:[0,3,2],utf:3,possibl:[0,3,2],whether:0,pacman:[0,3,2],displai:[3,2],limit:0,otherwis:0,problem:3,featur:0,uid:2,dure:3,exist:3,file:[0,3],inf:3,check:[3,2],when:3,field:3,other:[0,3,2],sysupgrad:2,you:[0,3,2],novalid:2,sequenc:3,ansi:2,dropbox:2,outdat:3,directori:2,descript:2,ignor:[3,2],time:3,unicodedecodeerror:3},objtypes:{},titles:["README for PKGBUILDer","PKGBUILDer 2.1.1.3 documentation","PKGBUILDer","Appendix B. PKGBUILDer message numbers list"],objnames:{},filenames:["README","index","pkgbuilder","messagecodes"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:0,code:[0,3,2],queri:2,four:3,follow:[0,2],categori:[1,2,3],iconv:3,procur:0,depend:3,friendli:2,send:2,aur:[0,1,2,3],mispel:3,skip:2,aris:0,neglig:0,introduc:0,merchant:0,digit:3,sourc:0,string:3,util:3,exact:3,err:3,list:[0,1,3],pleas:3,impli:0,direct:0,maintain:[3,2],download:3,compat:[0,2],sub:3,section:2,calcul:3,current:2,delet:3,version:[0,3,2],"new":0,order:3,"public":2,deriv:0,disclaim:0,met:0,modif:0,sinc:2,search:[3,2],prior:0,permit:0,extra:0,modul:[3,2],api:3,instal:[0,3,2],from:[0,3,2],proceed:3,visit:2,perl:0,usr:0,tell:3,more:[0,3,2],desir:3,notic:0,warn:[1,3],appendix:[1,3],particular:0,must:0,none:3,pkgbuild:3,pyalpm:0,work:2,subel:3,can:2,purpos:0,root:3,process:2,accept:2,tarbal:3,occur:3,instead:2,updat:[3,2],product:0,after:3,befor:3,mai:0,data:0,man:0,"short":3,author:[0,3,2],element:3,caus:0,inform:[1,3],bulit:3,juan:3,oper:2,help:3,softwar:0,consent:0,through:3,paramet:[0,2],conjunct:2,group:2,fit:0,makepkg:[3,2],tort:0,mail:2,non:3,good:0,"return":3,thei:2,python:[0,1,2,3],interrupt:0,now:[0,2],nor:[0,3],name:[0,3,2],auto_build:3,refresh:2,each:3,debug:3,found:[3,2],mean:3,domain:2,vote:2,redistribut:0,happen:3,extract:3,event:0,special:[0,2],out:[0,3,2],shown:3,profit:0,content:1,cwd:2,reason:3,theori:0,ask:3,"byte":3,place:2,retain:0,first:[3,2],origin:[0,2],endors:0,arrai:3,number:[1,3],predepcheck:3,date:[0,3,2],instruct:3,wrapper:[0,2],wasn:3,owner:[0,2],stabl:0,script:[3,2],licens:2,system:3,messag:[1,3],too:3,illeg:3,option:2,copi:0,sync:2,github:2,holder:0,than:3,target:2,provid:[0,3,2],charact:3,posit:3,sai:2,ani:[0,3],packag:[0,3,2],substitut:0,need:[0,3],issu:[3,2],built:2,note:0,also:[3,2],without:0,build:[0,3,2],which:[3,2],noth:3,even:0,distribut:0,shall:[0,2],multipli:3,letter:3,phase:2,"class":3,build_runn:3,url:2,doc:0,request:3,doe:3,syntax:2,find:3,copyright:[0,2],explain:3,busi:0,meant:3,hit:3,variou:2,get:3,express:0,pypi:0,repo:2,cannot:3,report:2,liabl:0,requir:3,bad:3,see:2,result:3,reserv:0,correctli:3,someth:3,written:0,pkgbuilder:[0,1,2,3],neither:0,incident:0,last:2,howev:[0,3],contract:0,mani:0,com:2,comment:3,kwpolska:[0,3,2],color:2,exemplari:0,damag:0,liabil:0,addition:2,three:3,been:2,compon:3,much:2,consequenti:0,piconv:3,togeth:3,plain:3,servic:0,"while":3,abov:[0,3],error:[1,3],helper:[0,1,2],readm:[0,1],them:2,synopsi:2,incorrectli:3,perform:3,make:2,shorter:3,binari:0,html:0,decod:3,document:[0,1,2,3],http:2,depcheck:3,user:2,syu:2,techniqu:2,exampl:[3,2],thi:[0,3,2],usual:3,identifi:3,yet:3,add:[0,3],valid:[3,2],input:3,match:3,bin:0,applic:2,advis:0,format:2,read:3,big:0,password:3,python3:0,loss:0,specif:0,makedepend:3,manual:2,nocolor:2,output:3,page:[0,2],right:[0,3],indirect:0,librari:[0,1,2],tmp:2,leap:0,exit:3,condit:0,reproduc:0,thhe:2,refer:[0,3],usag:3,broken:3,promot:0,repositori:3,about:[3,2],materi:0,submitt:3,encod:3,automat:[3,2],warranti:0,contributor:0,your:3,git:2,wai:0,submit:2,avail:0,strict:0,includ:[0,3],forward:0,properli:3,form:0,offer:2,forc:2,bug:2,info:[0,3,2],utf:3,possibl:[0,3,2],whether:0,pacman:[0,3,2],displai:[3,2],limit:0,otherwis:0,problem:3,featur:0,uid:2,dure:3,exist:3,file:[0,3],inf:3,check:[3,2],probabl:3,when:3,field:3,other:[0,3,2],sysupgrad:2,you:[0,3,2],novalid:2,sequenc:3,ansi:2,dropbox:2,outdat:3,directori:2,descript:2,ignor:[3,2],time:3,unicodedecodeerror:3},objtypes:{},titles:["README for PKGBUILDer","PKGBUILDer 2.1.1.4 documentation","PKGBUILDer","Appendix B. PKGBUILDer message numbers list"],objnames:{},filenames:["README","index","pkgbuilder","messagecodes"]}) \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 2442e2a..426b88b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,7 +3,7 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -PKGBUILDer 2.1.1.3 documentation +PKGBUILDer 2.1.1.4 documentation ================================ Contents: diff --git a/docs/messagecodes.rst b/docs/messagecodes.rst index b2fda91..8618887 100644 --- a/docs/messagecodes.rst +++ b/docs/messagecodes.rst @@ -3,8 +3,8 @@ Appendix B. PKGBUILDer message numbers list =========================================== :Info: This is an appendix to the PKGBUILDer documentation. :Author: Kwpolska -:Date: 2011-10-04 -:Version: 2.1.1.3 +:Date: 2011-10-07 +:Version: 2.1.1.4 In order to help debugging, messages are numbered. Each message number has four digits: the first one is the @@ -29,7 +29,7 @@ Usage instructions In order to get the category identifier, you need to: * multiply the desired list element by 1000 - * multiply the desired subelement by 100 + * multiply the desired subelement (if any) by 100 * add the results together In order to get the first possible number of this (sub)category, add 1 to @@ -63,6 +63,7 @@ Errors ======== =============== ========================================= ERR# Component Message ======== =============== ========================================= +[3001]_ build_runner package not found [3101]_ download 0 bytes downloaded [3151]_ extract 0 files extracted [3201]_ depcheck cannot find the requested dependency @@ -76,6 +77,9 @@ ERR# Component Message Explainations: +.. [3001] occurs, when PKGBUILDer cannot find the requested package. + The name is probably mispelled or the package was deleted. + .. [3101] occurs, when PKGBUILDer downloaded 0 bytes. It usually means that something bad happened during the download. diff --git a/docs/pkgbuilder.8.gz b/docs/pkgbuilder.8.gz index e288ddf..810bb7e 100644 Binary files a/docs/pkgbuilder.8.gz and b/docs/pkgbuilder.8.gz differ diff --git a/docs/pkgbuilder.rst b/docs/pkgbuilder.rst index 16da256..3146460 100644 --- a/docs/pkgbuilder.rst +++ b/docs/pkgbuilder.rst @@ -8,8 +8,8 @@ a Python AUR helper/library :Author: Kwpolska :Copyright: This document has been placed in the public domain. -:Date: 2011-10-04 -:Version: 2.1.1.3 +:Date: 2011-10-07 +:Version: 2.1.1.4 :Manual section: 8 :Manual group: PKGBUILDer manual diff --git a/locale/en/LC_MESSAGES/pkgbuilder.po b/locale/en/LC_MESSAGES/pkgbuilder.po new file mode 100644 index 0000000..879d095 --- /dev/null +++ b/locale/en/LC_MESSAGES/pkgbuilder.po @@ -0,0 +1,325 @@ +# PKGBUILDer pot file. +# Copyright (C) 2011 Kwpolska. +# Kwpolska , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: 2.1.1.4\n" +"POT-Creation-Date: 2011-10-06 18:38+CEST\n" +"PO-Revision-Date: 2011-10-07 19:30+0100\n" +"Last-Translator: Kwpolska \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" + +#: INSTALL.py:27 +msgid "" +"Hello!\n" +"\n" +"PKGBUILDer is now available as an AUR package. It is the suggested\n" +"way of installing PKGBUILDer. This script will download the AUR\n" +"package and install it. If you will have problems, please download\n" +"and compile the package manually.\n" +"\n" +msgstr "" +"Hello!\n" +"\n" +"PKGBUILDer is now available as an AUR package. It is the suggested\n" +"way of installing PKGBUILDer. This script will download the AUR\n" +"package and install it. If you will have problems, please download\n" +"and compile the package manually.\n" +"\n" + +#: INSTALL.py:36 +msgid "Hit Enter/Return to continue. " +msgstr "Hit Enter/Return to continue. " + +#: INSTALL.py:61 +msgid "" +"\n" +"\n" +"Something went wrong. Please read makepkg's output and try again.\n" +"You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If I am wrong, though, congratulations!\n" +msgstr "" +"\n" +"\n" +"Something went wrong. Please read makepkg's output and try again.\n" +"You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If I am wrong, though, congratulations!\n" + +#: INSTALL.py:72 +msgid "" +"\n" +"\n" +"Read the above output. If the script had any problems, run it\n" +"again. You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If everything went fine, though, congratulations! You can now use\n" +"PKGBUILDer. For standalone usage, type `pkgbuilder` into the prompt\n" +"(zsh users: hash -r, other shells may need another command). For\n" +"python module usage, type `import pkgbuilder` into the python prompt.\n" +msgstr "" +"\n" +"\n" +"Read the above output. If the script had any problems, run it\n" +"again. You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If everything went fine, though, congratulations! You can now use\n" +"PKGBUILDer. For standalone usage, type `pkgbuilder` into the prompt\n" +"(zsh users: hash -r, other shells may need another command). For\n" +"python module usage, type `import pkgbuilder` into the python prompt.\n" + +#: INSTALL.py:87 +msgid "" +"It looks like you want to quit. Okay then, goodbye.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If that's what you want to do, go for it. If it isn't, run this\n" +"script again." +msgstr "" +"It looks like you want to quit. Okay then, goodbye.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If that's what you want to do, go for it. If it isn't, run this\n" +"script again." + +#: pkgbuilder.py:102 +msgid "WARNING:" +msgstr "WARNING:" + +#: pkgbuilder.py:109 +msgid "ERROR:" +msgstr "ERROR:" + +#: pkgbuilder.py:217 +msgid " [installed: {0}]" +msgstr " [installed: {0}]" + +#: pkgbuilder.py:219 +msgid " [installed]" +msgstr " [installed]" + +#: pkgbuilder.py:221 +msgid "[out of date]" +msgstr "[out of date]" + +#: pkgbuilder.py:228 +#: pkgbuilder.py:231 +msgid "votes" +msgstr "votes" + +#: pkgbuilder.py:265 +msgid "The build function reported a proper build." +msgstr "The build function reported a proper build." + +#: pkgbuilder.py:274 +msgid "[ERR3451] validation: NOT installed" +msgstr "[ERR3451] validation: NOT installed" + +#: pkgbuilder.py:279 +msgid "[ERR3452] validation: outdated {0}" +msgstr "[ERR3452] validation: outdated {0}" + +#: pkgbuilder.py:282 +msgid "[INF3450] validation: installed {0}" +msgstr "[INF3450] validation: installed {0}" + +#: pkgbuilder.py:287 +msgid "[ERR3301] makepkg returned 1." +msgstr "[ERR3301] makepkg returned 1." + +#: pkgbuilder.py:292 +msgid "[ERR3401] Building more AUR packages is required." +msgstr "[ERR3401] Building more AUR packages is required." + +#: pkgbuilder.py:316 +msgid "[ERR3101] download: 0 bytes downloaded" +msgstr "[ERR3101] download: 0 bytes downloaded" + +#: pkgbuilder.py:331 +msgid "[ERR3151] extract: no files extracted" +msgstr "[ERR3151] extract: no files extracted" + +#: pkgbuilder.py:409 +#: pkgbuilder.py:460 +msgid "[ERR3201] depcheck: cannot find {0} anywhere" +msgstr "[ERR3201] depcheck: cannot find {0} anywhere" + +#: pkgbuilder.py:426 +msgid "[ERR3001] Package {0} not found." +msgstr "[ERR3001] Package {0} not found." + +#: pkgbuilder.py:429 +msgid "Building {0}..." +msgstr "Building {0}..." + +#: pkgbuilder.py:437 +msgid "Downloading the tarball..." +msgstr "Downloading the tarball..." + +#: pkgbuilder.py:440 +msgid "{0} kB downloaded" +msgstr "{0} kB downloaded" + +#: pkgbuilder.py:442 +msgid "Extracting..." +msgstr "Extracting..." + +#: pkgbuilder.py:443 +msgid "{0} files extracted" +msgstr "{0} files extracted" + +#: pkgbuilder.py:447 +msgid "Checking dependencies..." +msgstr "Checking dependencies..." + +#: pkgbuilder.py:452 +msgid "found in repos" +msgstr "found in repos" + +#: pkgbuilder.py:452 +msgid "found in system" +msgstr "found in system" + +#: pkgbuilder.py:453 +msgid "found in the AUR" +msgstr "found in the AUR" + +#: pkgbuilder.py:456 +msgid "none found" +msgstr "none found" + +#: pkgbuilder.py:470 +msgid "[ERR3202] depcheck: UnicodeDecodeError. The PKGBUILD cannot be read. There are invalid UTF-8 characters (eg. in the Maintainer field.) Error message: {0}" +msgstr "[ERR3202] depcheck: UnicodeDecodeError. The PKGBUILD cannot be read. There are invalid UTF-8 characters (eg. in the Maintainer field.) Error message: {0}" + +#: pkgbuilder.py:553 +msgid "Gathering data about packages..." +msgstr "Gathering data about packages..." + +#: pkgbuilder.py:559 +msgid "{0} upgradeable packages found:" +msgstr "{0} upgradeable packages found:" + +#: pkgbuilder.py:561 +msgid "there is nothing to do" +msgstr "there is nothing to do" + +#: pkgbuilder.py:565 +msgid "Proceed with installation? [Y/n] " +msgstr "Proceed with installation? [Y/n] " + +#: pkgbuilder.py:582 +msgid "A python3 AUR helper (sort of.) Wrapper-friendly (pacman-like output.)" +msgstr "A python3 AUR helper (sort of.) Wrapper-friendly (pacman-like output.)" + +#: pkgbuilder.py:583 +msgid "You can use pacman syntax if you want to." +msgstr "You can use pacman syntax if you want to." + +#: pkgbuilder.py:589 +msgid "packages to build" +msgstr "packages to build" + +#: pkgbuilder.py:594 +msgid "don't use colors in output" +msgstr "don't use colors in output" + +#: pkgbuilder.py:597 +msgid "pacman syntax compatiblity" +msgstr "pacman syntax compatiblity" + +#: pkgbuilder.py:599 +msgid "don't check if packages were installed after build" +msgstr "don't check if packages were installed after build" + +#: pkgbuilder.py:602 +msgid "pacman syntax compatiblity" +msgstr "pacman syntax compatiblity" + +#: pkgbuilder.py:606 +msgid "view package information" +msgstr "view package information" + +#: pkgbuilder.py:608 +msgid "search the AUR for matching strings" +msgstr "search the AUR for matching strings" + +#: pkgbuilder.py:612 +msgid "upgrade installed AUR packages" +msgstr "upgrade installed AUR packages" + +#: pkgbuilder.py:631 +msgid "Package {0} not found." +msgstr "Package {0} not found." + +#: pkgbuilder.py:635 +msgid "" +"Category : {0}\n" +"Name : {1}\n" +"URL : {3}\n" +"Licenses : {4}\n" +"Votes : {5}\n" +"Out of Date : {6}\n" +"Maintainer : {7}\n" +"Last Updated : {8}\n" +"First Submitted: {9}\n" +"Description : {10}\n" +msgstr "" +"Category : {0}\n" +"Name : {1}\n" +"URL : {3}\n" +"Licenses : {4}\n" +"Votes : {5}\n" +"Out of Date : {6}\n" +"Maintainer : {7}\n" +"Last Updated : {8}\n" +"First Submitted: {9}\n" +"Description : {10}\n" + +#: pkgbuilder.py:647 +msgid "yes" +msgstr "yes" + +#: pkgbuilder.py:648 +msgid "no" +msgstr "no" + +#: pkgbuilder.py:661 +msgid "[ERR5002] search string too short, API limitation" +msgstr "[ERR5002] search string too short, API limitation" + +#: pkgbuilder.py:663 +msgid "Searching for exact match..." +msgstr "Searching for exact match..." + +#: pkgbuilder.py:666 +msgid "not found" +msgstr "not found" + +#: pkgbuilder.py:669 +msgid "found" +msgstr "found" + diff --git a/locale/pl/LC_MESSAGES/pkgbuilder.po b/locale/pl/LC_MESSAGES/pkgbuilder.po new file mode 100644 index 0000000..e703ac9 --- /dev/null +++ b/locale/pl/LC_MESSAGES/pkgbuilder.po @@ -0,0 +1,325 @@ +# PKGBUILDer pot file. +# Copyright (C) 2011 Kwpolska. +# Kwpolska , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: 2.1.1.4\n" +"POT-Creation-Date: 2011-10-06 18:38+CEST\n" +"PO-Revision-Date: 2011-10-07 19:32+0100\n" +"Last-Translator: Kwpolska \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" + +#: INSTALL.py:27 +msgid "" +"Hello!\n" +"\n" +"PKGBUILDer is now available as an AUR package. It is the suggested\n" +"way of installing PKGBUILDer. This script will download the AUR\n" +"package and install it. If you will have problems, please download\n" +"and compile the package manually.\n" +"\n" +msgstr "" +"Cześć!\n" +"\n" +"PKGBUILDer jest teraz dostępny jako pakiet w AUR. Jest to polecany\n" +"sposób instalacji PKGBUILDer-a. Ten skrypt pobierze pakiet z AUR i go\n" +"zainstaluje. Jeśli będziesz miał problemy, pobierz i skompiluj pakiet\n" +"ręcznie.\n" +"\n" + +#: INSTALL.py:36 +msgid "Hit Enter/Return to continue. " +msgstr "Wciśnij Enter/Return aby kontynuować." + +#: INSTALL.py:61 +msgid "" +"\n" +"\n" +"Something went wrong. Please read makepkg's output and try again.\n" +"You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If I am wrong, though, congratulations!\n" +msgstr "" +"\n" +"\n" +"Coś się popsuło. Przeczytaj to, co wypisał makepkg i spróbuj ponownie.\n" +"Możesz też próbować debugować pracę tego skryptu samemu.\n" +"Wszystkie pliki, nad którymi ten skrypt pracował, znajdują się w\n" +" {0}\n" +"(liczba jest losowa).\n" +"\n" +"Jeśli się mylę, gratulacje!\n" + +#: INSTALL.py:72 +msgid "" +"\n" +"\n" +"Read the above output. If the script had any problems, run it\n" +"again. You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If everything went fine, though, congratulations! You can now use\n" +"PKGBUILDer. For standalone usage, type `pkgbuilder` into the prompt\n" +"(zsh users: hash -r, other shells may need another command). For\n" +"python module usage, type `import pkgbuilder` into the python prompt.\n" +msgstr "" +"\n" +"\n" +"Przeczytaj powyższy tekst. Jeśli skrypt miał problemy, spróbuj\n" +"jeszcze raz. Możesz też spróbować samodzielnie debugować pracę skryptu.\n" +"Wszystkie pliki, nad którymi ten skrypt pracował, znajdują się w\n" +" {0}\n" +"(liczba jest losowa).\n" +"\n" +"Jeśli wszystko się udało, gratulacje! Teraz możesz używać PKGBUILDer-a.\n" +"Dla użycia samodzielnego, wpisz `pkgbuilder` do terminala (zsh: hash -r,\n" +"inne powłoki mogą wymagać innej komendy). Dla użycia jako moduł\n" +"Pythona, wpisz `import pkgbuilder` do interpretera.\n" + +#: INSTALL.py:87 +msgid "" +"It looks like you want to quit. Okay then, goodbye.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If that's what you want to do, go for it. If it isn't, run this\n" +"script again." +msgstr "" +"Wygląda na to, że chcesz wyjść. Okej, do widzenia.\n" +"Wszystkie pliki, nad którymi ten skrypt pracował, znajdują się w\n" +" {0}\n" +"(liczba jest losowa).\n" +"\n" +"Jeśli to jest to, co chcesz zrobić, proszę bardzo. Jeśli nie,\n" +"uruchom ten skrypt jeszcze raz." + +#: pkgbuilder.py:102 +msgid "WARNING:" +msgstr "UWAGA:" + +#: pkgbuilder.py:109 +msgid "ERROR:" +msgstr "BŁĄD:" + +#: pkgbuilder.py:217 +msgid " [installed: {0}]" +msgstr "[zainstalowano: {0}]" + +#: pkgbuilder.py:219 +msgid " [installed]" +msgstr "[zainstalowano]" + +#: pkgbuilder.py:221 +msgid "[out of date]" +msgstr "[nieaktualny]" + +#: pkgbuilder.py:228 +#: pkgbuilder.py:231 +msgid "votes" +msgstr "głosów" + +#: pkgbuilder.py:265 +msgid "The build function reported a proper build." +msgstr "Funkcja budowania paczek powiadomiła o prawidłowym zbudowaniu." + +#: pkgbuilder.py:274 +msgid "[ERR3451] validation: NOT installed" +msgstr "[ERR3451] walidacja: NIE zainstalowano" + +#: pkgbuilder.py:279 +msgid "[ERR3452] validation: outdated {0}" +msgstr "[ERR3452] walidacja: nieaktualne {0}" + +#: pkgbuilder.py:282 +msgid "[INF3450] validation: installed {0}" +msgstr "[INF3450] walidacja: zainstalowane {0}" + +#: pkgbuilder.py:287 +msgid "[ERR3301] makepkg returned 1." +msgstr "[ERR3301] makepkg zwrócił 1." + +#: pkgbuilder.py:292 +msgid "[ERR3401] Building more AUR packages is required." +msgstr "[ERR3401] Należy zainstalować więcej pakietów z AUR." + +#: pkgbuilder.py:316 +msgid "[ERR3101] download: 0 bytes downloaded" +msgstr "[ERR3101] download: ściągnięto 0 bajtów" + +#: pkgbuilder.py:331 +msgid "[ERR3151] extract: no files extracted" +msgstr "[ERR3151] extract: wypakowano 0 plików" + +#: pkgbuilder.py:409 +#: pkgbuilder.py:460 +msgid "[ERR3201] depcheck: cannot find {0} anywhere" +msgstr "[ERR3201] depcheck: nie można nigdzie znaleźć pakietu {0}" + +#: pkgbuilder.py:426 +msgid "[ERR3001] Package {0} not found." +msgstr "[ERR3001] Nie znaleziono pakietu {0}." + +#: pkgbuilder.py:429 +msgid "Building {0}..." +msgstr "Budowanie {0}..." + +#: pkgbuilder.py:437 +msgid "Downloading the tarball..." +msgstr "Ściąganie paczki..." + +#: pkgbuilder.py:440 +msgid "{0} kB downloaded" +msgstr "ściągnięto {0} kB" + +#: pkgbuilder.py:442 +msgid "Extracting..." +msgstr "Wypakowywanie..." + +#: pkgbuilder.py:443 +msgid "{0} files extracted" +msgstr "wypakowano {0} plików" + +#: pkgbuilder.py:447 +msgid "Checking dependencies..." +msgstr "Sprawdzanie zależności..." + +#: pkgbuilder.py:452 +msgid "found in repos" +msgstr "znaleziono w repozytoriach" + +#: pkgbuilder.py:452 +msgid "found in system" +msgstr "znaleziono w systemie" + +#: pkgbuilder.py:453 +msgid "found in the AUR" +msgstr "znaleziono w AUR" + +#: pkgbuilder.py:456 +msgid "none found" +msgstr "brak" + +#: pkgbuilder.py:470 +msgid "[ERR3202] depcheck: UnicodeDecodeError. The PKGBUILD cannot be read. There are invalid UTF-8 characters (eg. in the Maintainer field.) Error message: {0}" +msgstr "[ERR3202] depcheck: UnicodeDecodeError. Nie można przeczytać PKGBUILD. Znajdują się w nim nieprawidłowe znaki UTF-8. Treść błędu: {0}" + +#: pkgbuilder.py:553 +msgid "Gathering data about packages..." +msgstr "Zbieranie informacji o pakietach..." + +#: pkgbuilder.py:559 +msgid "{0} upgradeable packages found:" +msgstr "Znaleziono {0} pakietów do aktualizacji:" + +#: pkgbuilder.py:561 +msgid "there is nothing to do" +msgstr "nie ma nic do zrobienia" + +#: pkgbuilder.py:565 +msgid "Proceed with installation? [Y/n] " +msgstr "Kontynuować instalację? [Y/n]" + +#: pkgbuilder.py:582 +msgid "A python3 AUR helper (sort of.) Wrapper-friendly (pacman-like output.)" +msgstr "AUR helper w pythonie 3. Przyjazny dla wrapperów." + +#: pkgbuilder.py:583 +msgid "You can use pacman syntax if you want to." +msgstr "Jeśli chcesz, możesz używać składni pacmana." + +#: pkgbuilder.py:589 +msgid "packages to build" +msgstr "pakiety do zbudowania" + +#: pkgbuilder.py:594 +msgid "don't use colors in output" +msgstr "nie używa kolorów na wyjściu" + +#: pkgbuilder.py:597 +msgid "pacman syntax compatiblity" +msgstr "kompatybilność ze składnią pacmana" + +#: pkgbuilder.py:599 +msgid "don't check if packages were installed after build" +msgstr "nie sprawdza czy pakiety zostały zainstalowane po zbudowaniu" + +#: pkgbuilder.py:602 +msgid "pacman syntax compatiblity" +msgstr "kompatybilność ze składnią pacmana" + +#: pkgbuilder.py:606 +msgid "view package information" +msgstr "wyświetla informację o pakiecie" + +#: pkgbuilder.py:608 +msgid "search the AUR for matching strings" +msgstr "przeszukuje AUR według pasujących ciągów" + +#: pkgbuilder.py:612 +msgid "upgrade installed AUR packages" +msgstr "uaktualnia zainstalowane pakiety" + +#: pkgbuilder.py:631 +msgid "Package {0} not found." +msgstr "Nie znaleziono pakietu {0}." + +#: pkgbuilder.py:635 +msgid "" +"Category : {0}\n" +"Name : {1}\n" +"URL : {3}\n" +"Licenses : {4}\n" +"Votes : {5}\n" +"Out of Date : {6}\n" +"Maintainer : {7}\n" +"Last Updated : {8}\n" +"First Submitted: {9}\n" +"Description : {10}\n" +msgstr "" +"Kategoria : {0}\n" +"Nazwa : {1}\n" +"URL : {3}\n" +"Licencje : {4}\n" +"Głosy : {5}\n" +"Nieaktualny : {6}\n" +"Opiekun : {7}\n" +"Ost. aktualiz. : {8}\n" +"Wysłany : {9}\n" +"Opis : {10}\n" + +#: pkgbuilder.py:647 +msgid "yes" +msgstr "tak" + +#: pkgbuilder.py:648 +msgid "no" +msgstr "nie" + +#: pkgbuilder.py:661 +msgid "[ERR5002] search string too short, API limitation" +msgstr "[ERR5002] ciąg zbyt krótki, limitacja API" + +#: pkgbuilder.py:663 +msgid "Searching for exact match..." +msgstr "Szukanie dokładnego dopasowania..." + +#: pkgbuilder.py:666 +msgid "not found" +msgstr "nie znaleziono" + +#: pkgbuilder.py:669 +msgid "found" +msgstr "znaleziono" + diff --git a/messages.pot b/messages.pot new file mode 100644 index 0000000..f8fdfb3 --- /dev/null +++ b/messages.pot @@ -0,0 +1,277 @@ +# PKGBUILDer pot file. +# Copyright (C) 2011 Kwpolska. +# Kwpolska , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: 2.1.1.4\n" +"POT-Creation-Date: 2011-10-06 18:38+CEST\n" +"PO-Revision-Date: 2011-10-07 17:44+0100\n" +"Last-Translator: Kwpolska \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" +"Language-Team: \n" + +#: INSTALL.py:27 +msgid "" +"Hello!\n" +"\n" +"PKGBUILDer is now available as an AUR package. It is the suggested\n" +"way of installing PKGBUILDer. This script will download the AUR\n" +"package and install it. If you will have problems, please download\n" +"and compile the package manually.\n" +"\n" +msgstr "" + +#: INSTALL.py:36 +msgid "Hit Enter/Return to continue. " +msgstr "" + +#: INSTALL.py:61 +msgid "" +"\n" +"\n" +"Something went wrong. Please read makepkg's output and try again.\n" +"You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If I am wrong, though, congratulations!\n" +msgstr "" + +#: INSTALL.py:72 +msgid "" +"\n" +"\n" +"Read the above output. If the script had any problems, run it\n" +"again. You can also try to debug the work of this script yourself.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If everything went fine, though, congratulations! You can now use\n" +"PKGBUILDer. For standalone usage, type `pkgbuilder` into the prompt\n" +"(zsh users: hash -r, other shells may need another command). For\n" +"python module usage, type `import pkgbuilder` into the python prompt.\n" +msgstr "" + +#: INSTALL.py:87 +msgid "" +"It looks like you want to quit. Okay then, goodbye.\n" +"All the files this script was working on are placed in\n" +" {0}\n" +"(the number is random).\n" +"\n" +"If that's what you want to do, go for it. If it isn't, run this\n" +"script again." +msgstr "" + +#: pkgbuilder.py:102 +msgid "WARNING:" +msgstr "" + +#: pkgbuilder.py:109 +msgid "ERROR:" +msgstr "" + +#: pkgbuilder.py:217 +msgid " [installed: {0}]" +msgstr "" + +#: pkgbuilder.py:219 +msgid " [installed]" +msgstr "" + +#: pkgbuilder.py:221 +msgid "[out of date]" +msgstr "" + +#: pkgbuilder.py:228 pkgbuilder.py:231 +msgid "votes" +msgstr "" + +#: pkgbuilder.py:265 +msgid "The build function reported a proper build." +msgstr "" + +#: pkgbuilder.py:274 +msgid "[ERR3451] validation: NOT installed" +msgstr "" + +#: pkgbuilder.py:279 +msgid "[ERR3452] validation: outdated {0}" +msgstr "" + +#: pkgbuilder.py:282 +msgid "[INF3450] validation: installed {0}" +msgstr "" + +#: pkgbuilder.py:287 +msgid "[ERR3301] makepkg returned 1." +msgstr "" + +#: pkgbuilder.py:292 +msgid "[ERR3401] Building more AUR packages is required." +msgstr "" + +#: pkgbuilder.py:316 +msgid "[ERR3101] download: 0 bytes downloaded" +msgstr "" + +#: pkgbuilder.py:331 +msgid "[ERR3151] extract: no files extracted" +msgstr "" + +#: pkgbuilder.py:409 pkgbuilder.py:460 +msgid "[ERR3201] depcheck: cannot find {0} anywhere" +msgstr "" + +#: pkgbuilder.py:426 +msgid "[ERR3001] Package {0} not found." +msgstr "" + +#: pkgbuilder.py:429 +msgid "Building {0}..." +msgstr "" + +#: pkgbuilder.py:437 +msgid "Downloading the tarball..." +msgstr "" + +#: pkgbuilder.py:440 +msgid "{0} kB downloaded" +msgstr "" + +#: pkgbuilder.py:442 +msgid "Extracting..." +msgstr "" + +#: pkgbuilder.py:443 +msgid "{0} files extracted" +msgstr "" + +#: pkgbuilder.py:447 +msgid "Checking dependencies..." +msgstr "" + +#: pkgbuilder.py:452 +msgid "found in repos" +msgstr "" + +#: pkgbuilder.py:452 +msgid "found in system" +msgstr "" + +#: pkgbuilder.py:453 +msgid "found in the AUR" +msgstr "" + +#: pkgbuilder.py:456 +msgid "none found" +msgstr "" + +#: pkgbuilder.py:470 +msgid "[ERR3202] depcheck: UnicodeDecodeError. The PKGBUILD cannot be read. There are invalid UTF-8 characters (eg. in the Maintainer field.) Error message: {0}" +msgstr "" + +#: pkgbuilder.py:553 +msgid "Gathering data about packages..." +msgstr "" + +#: pkgbuilder.py:559 +msgid "{0} upgradeable packages found:" +msgstr "" + +#: pkgbuilder.py:561 +msgid "there is nothing to do" +msgstr "" + +#: pkgbuilder.py:565 +msgid "Proceed with installation? [Y/n] " +msgstr "" + +#: pkgbuilder.py:582 +msgid "A python3 AUR helper (sort of.) Wrapper-friendly (pacman-like output.)" +msgstr "" + +#: pkgbuilder.py:583 +msgid "You can use pacman syntax if you want to." +msgstr "" + +#: pkgbuilder.py:589 +msgid "packages to build" +msgstr "" + +#: pkgbuilder.py:594 +msgid "don't use colors in output" +msgstr "" + +#: pkgbuilder.py:597 +msgid "pacman syntax compatiblity" +msgstr "" + +#: pkgbuilder.py:599 +msgid "don't check if packages were installed after build" +msgstr "" + +#: pkgbuilder.py:602 +msgid "pacman syntax compatiblity" +msgstr "" + +#: pkgbuilder.py:606 +msgid "view package information" +msgstr "" + +#: pkgbuilder.py:608 +msgid "search the AUR for matching strings" +msgstr "" + +#: pkgbuilder.py:612 +msgid "upgrade installed AUR packages" +msgstr "" + +#: pkgbuilder.py:631 +msgid "Package {0} not found." +msgstr "" + +#: pkgbuilder.py:635 +msgid "" +"Category : {0}\n" +"Name : {1}\n" +"URL : {3}\n" +"Licenses : {4}\n" +"Votes : {5}\n" +"Out of Date : {6}\n" +"Maintainer : {7}\n" +"Last Updated : {8}\n" +"First Submitted: {9}\n" +"Description : {10}\n" +msgstr "" + +#: pkgbuilder.py:647 +msgid "yes" +msgstr "" + +#: pkgbuilder.py:648 +msgid "no" +msgstr "" + +#: pkgbuilder.py:661 +msgid "[ERR5002] search string too short, API limitation" +msgstr "" + +#: pkgbuilder.py:663 +msgid "Searching for exact match..." +msgstr "" + +#: pkgbuilder.py:666 +msgid "not found" +msgstr "" + +#: pkgbuilder.py:669 +msgid "found" +msgstr "" + diff --git a/pkgbuilder.py b/pkgbuilder.py index 707e879..3a466d3 100755 --- a/pkgbuilder.py +++ b/pkgbuilder.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -# PKGBUILDer Version 2.1.1.3 +# PKGBUILDer Version 2.1.1.4 # A Python AUR helper/library. # Copyright Kwpolska 2011. Licensed under GPLv3. # USAGE: ./build.py pkg1 [pkg2] [pkg3] (and more) @@ -17,8 +17,15 @@ import tarfile import subprocess import datetime +import gettext + +VERSION = '2.1.1.4' +T = gettext.translation('pkgbuilder', '/usr/share/locale') +def _(message): + """gettext""" + out = T.lgettext(message) + return out.decode() -VERSION = '2.1.1.3' ### PBDS PB global data storage ### class PBDS: @@ -27,14 +34,14 @@ def __init__(self): """PBDS init""" # Fancy-schmancy messages stolen from makepkg. - self.all_off = "\x1b[1;0m" + self.all_off = '\x1b[1;0m' self.colors = { - 'all_off': "\x1b[1;0m", - 'bold': "\x1b[1;1m", - 'blue': "\x1b[1;1m\x1b[1;34m", - 'green': "\x1b[1;1m\x1b[1;32m", - 'red': "\x1b[1;1m\x1b[1;31m", - 'yellow': "\x1b[1;1m\x1b[1;33m" + 'all_off': '\x1b[1;0m', + 'bold': '\x1b[1;1m', + 'blue': '\x1b[1;1m\x1b[1;34m', + 'green': '\x1b[1;1m\x1b[1;32m', + 'red': '\x1b[1;1m\x1b[1;31m', + 'yellow': '\x1b[1;1m\x1b[1;33m' } self.pacman = False self.validate = True @@ -47,26 +54,24 @@ def __init__(self): def colorson(self): """colors on""" self.colors = { - 'all_off': "\x1b[1;0m", - 'bold': "\x1b[1;1m", - 'blue': "\x1b[1;1m\x1b[1;34m", - 'green': "\x1b[1;1m\x1b[1;32m", - 'red': "\x1b[1;1m\x1b[1;31m", - 'yellow': "\x1b[1;1m\x1b[1;33m" + 'all_off': '\x1b[1;0m', + 'bold': '\x1b[1;1m', + 'blue': '\x1b[1;1m\x1b[1;34m', + 'green': '\x1b[1;1m\x1b[1;32m', + 'red': '\x1b[1;1m\x1b[1;31m', + 'yellow': '\x1b[1;1m\x1b[1;33m' } - self.all_off = "\x1b[1;0m" - def colorsoff(self): """colors off""" self.colors = { - 'all_off': "", - 'bold': "", - 'blue': "", - 'green': "", - 'red': "", - 'yellow': "" + 'all_off': '', + 'bold': '', + 'blue': '', + 'green': '', + 'red': '', + 'yellow': '' } # Useless since python3-aur was replaced, but we'd make use of it. @@ -83,32 +88,33 @@ def pblog(msg, tofile = False, tostderr = False): def fancy_msg(text): """makepkg's msg(). Use for main messages.""" sys.stderr.write(DS.colors['green']+'==>'+DS.colors['all_off']+ - DS.colors['bold']+' '+text+DS.colors['all_off']+"\n") + DS.colors['bold']+' '+text+DS.colors['all_off']+'\n') pblog('(auto fancy_msg ) '+text) def fancy_msg2(text): """makepkg's msg2(). Use for sub-messages.""" sys.stderr.write(DS.colors['blue']+' ->'+DS.colors['all_off']+ - DS.colors['bold']+' '+text+DS.colors['all_off']+"\n") + DS.colors['bold']+' '+text+DS.colors['all_off']+'\n') pblog('(auto fancy_msg2 ) '+text) def fancy_warning(text): """makepkg's warning(). Use when you have problems.""" - sys.stderr.write(DS.colors['yellow']+'==> WARNING:'+ + sys.stderr.write(DS.colors['yellow']+'==> '+_('WARNING:')+ DS.colors['all_off']+DS.colors['bold']+' '+text+ - DS.colors['all_off']+"\n") + DS.colors['all_off']+'\n') pblog('(auto fancy_warning) '+text) def fancy_error(text): """makepkg's error(). Use for errors. Exitting is suggested.""" - sys.stderr.write(DS.colors['red']+'==> ERROR:'+DS.colors['all_off']+ - DS.colors['bold']+' '+text+DS.colors['all_off']+"\n") + sys.stderr.write(DS.colors['red']+'==> '+_('ERROR:')+ + DS.colors['all_off']+DS.colors['bold']+ + ' '+text+DS.colors['all_off']+'\n') pblog('(auto fancy_error ) '+text) def fancy_error2(text): """like fancy_error, but looks like a sub-message (fancy_msg2).""" sys.stderr.write(DS.colors['red']+' ->'+DS.colors['all_off']+ - DS.colors['bold']+' '+text+DS.colors['all_off']+"\n") + DS.colors['bold']+' '+text+DS.colors['all_off']+'\n') pblog('(auto fancy_error2 ) '+text) ### PBError errors raised here ### @@ -208,20 +214,22 @@ def print_package(self, pkg, use_categories = True, prefix=''): installed = '' if lpkg != None: if pyalpm.vercmp(pkg['Version'], lpkg.version) != 0: - installed = ' [installed: '+lpkg.version+']' + installed = _(' [installed: {0}]').format(lpkg.version) else: - installed = ' [installed]' + installed = _(' [installed]') if pkg['OutOfDate'] == 1: - installed = (installed + ' '+DS.colors['red']+'[out of date]'+ - DS.colors['all_off']) + installed = (installed + ' '+DS.colors['red']+_( + '[out of date]')+DS.colors['all_off']) if use_categories == True: category = DS.categories[int(pkg['CategoryID'])] else: category = 'aur' if prefix == '': - base = prefix+"{0}/{1} {2} ({4} votes){5}\n"+prefix+" {3}" + base = prefix+'{0}/{1} {2} ({4} '+_('votes')+'{5}\n'+prefix+'\ + {3}' else: - base = prefix+" {0}/{1} {2} ({4} votes){5}\n"+prefix+" {3}" + base = prefix+' {0}/{1} {2} ({4} '+_('votes')+'{5}\n'+prefix+'\ + {3}' print(base.format(category, pkg['Name'], pkg['Version'], pkg['Description'], pkg['NumVotes'], installed)) @@ -254,7 +262,7 @@ def auto_build(self, package, validate): build_result = self.build_runner(package) try: if build_result[0] == 0: - fancy_msg("The build function reported a proper build.") + fancy_msg(_('The build function reported a proper build.')) os.chdir('../') if validate == True: # check if installed @@ -263,25 +271,26 @@ def auto_build(self, package, validate): pkg = localdb.get_pkg(package) aurversion = self.utils.info(package)['Version'] if pkg is None: - fancy_error2("[ERR3451] validation: NOT installed") + fancy_error2(_('[ERR3451] validation: NOT \ +installed')) pyalpm.release() else: if pyalpm.vercmp(aurversion, pkg.version) > 0: - fancy_error2("[ERR3452] validation: outdated "+ - pkg.version) + fancy_error2(_('[ERR3452] validation: \ +outdated {0}').format(pkg.version)) else: - fancy_msg2("[INF3450] validation: installed "+ - pkg.version) + fancy_msg2(_('[INF3450] validation: \ +installed {0}').format(pkg.version)) pyalpm.release() elif build_result[0] == 1: os.chdir('../') - raise PBError("[ERR3301] makepkg returned 1.") + raise PBError(_('[ERR3301] makepkg returned 1.')) # I think that only makepkg can do that. Others would # raise an exception. elif build_result[0] == 2: os.chdir('../') - fancy_warning("[ERR3401] Building more AUR packages is \ -required.") + fancy_warning(_('[ERR3401] Building more AUR packages is \ +required.')) for package2 in build_result: self.auto_build(package2, True) self.auto_build(package, True) @@ -304,7 +313,7 @@ def download(self, urlpath, filename, prot = 'http'): if headers['Content-Length'] != 0: return headers['Content-Length'] else: - raise PBError('[ERR3101] download: 0 bytes downloaded') + raise PBError(_('[ERR3101] download: 0 bytes downloaded')) def extract(self, filename): """ @@ -319,7 +328,7 @@ def extract(self, filename): if names != []: return len(names) else: - raise PBError('[ERR3151] extract: no files extracted') + raise PBError(_('[ERR3151] extract: no files extracted')) def prepare_deps(self, pkgbuild): """ @@ -329,10 +338,10 @@ def prepare_deps(self, pkgbuild): and makedepends or []. """ # This code is bad. If you want to, fix it. - fixedp = """0123456789abcdefghijklmnopqrstuvwxyz\ -ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&*+,-./:;<=>?@[]^_`{|}~"'""" - pattern1 = "depends=(" + OneOrMore(Word(fixedp)) + ")" - pattern2 = "makedepends=(" + OneOrMore(Word(fixedp)) + ")" + fixedp = '0123456789abcdefghijklmnopqrstuvwxyz\ +ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&*+,-./:;<=>?@[]^_`{|}~"\'' + pattern1 = 'depends=(' + OneOrMore(Word(fixedp)) + ')' + pattern2 = 'makedepends=(' + OneOrMore(Word(fixedp)) + ')' try: bashdepends = next(pattern1.scanString(pkgbuild)) @@ -350,7 +359,7 @@ def prepare_deps(self, pkgbuild): makedepends = [ s.rstrip() for s in bmdepends[0][1:-1] ] bothdepends = depends + makedepends - return [ s.replace('"', '').replace("'", '') for s in bothdepends ] + return [s.replace('"', '').replace('\'', '') for s in bothdepends] def depcheck(self, bothdepends): """ @@ -363,7 +372,7 @@ def depcheck(self, bothdepends): Suggested way of handling: types = ['system', 'repos', 'aur'] for pkg, pkgtype in depcheck([...]).items(): - print("{0}: found in {1}".format(pkg, types[pkgtype]) + print('{0}: found in {1}'.format(pkg, types[pkgtype]) if pkgtype == 2: #AUR #build pkg here @@ -397,8 +406,8 @@ def depcheck(self, bothdepends): parseddeps[dep] = 2 else: parseddeps[dep] = -1 - raise PBError("[ERR3201] depcheck: cannot find {0} \ -anywhere".format(dep)) + raise PBError(_('[ERR3201] depcheck: cannot find {0} \ +anywhere').format(dep)) pyalpm.release() return parseddeps @@ -414,9 +423,10 @@ def build_runner(self, package): # exists pkginfo = self.utils.info(package) if pkginfo == False: - raise PBError('Package {0} not found.'.format(package)) + raise PBError(_('[ERR3001] Package {0} not found.').format( + package)) pkgname = pkginfo['Name'] - fancy_msg('Compiling package {0}...'.format(pkgname)) + fancy_msg(_('Building {0}...').format(pkgname)) self.utils.print_package(pkginfo, prefix=DS.colors['blue']+' ->'+ DS.colors['all_off']+ @@ -424,41 +434,42 @@ def build_runner(self, package): filename = pkgname+'.tar.gz' # Okay, this package exists, great then. Thanks, user. - fancy_msg('Downloading the tarball...') + fancy_msg(_('Downloading the tarball...')) downloadbytes = self.download(pkginfo['URLPath'], filename) kbytes = int(downloadbytes) / 1000 - fancy_msg2('{0} kB downloaded'.format(kbytes)) + fancy_msg2(_('{0} kB downloaded').format(kbytes)) - fancy_msg('Extracting...') - fancy_msg2('{0} files extracted'.format(self.extract( - filename))) + fancy_msg(_('Extracting...')) + fancy_msg2(_('{0} files extracted').format(self.extract( + filename))) os.chdir('./'+pkgname+'/') - fancy_msg('Checking dependencies...') + fancy_msg(_('Checking dependencies...')) try: bothdepends = self.prepare_deps(open('./PKGBUILD', 'rb').read().decode('utf8', 'ignore')) deps = self.depcheck(bothdepends) - pkgtypes = ['system', 'repos', 'the AUR'] + pkgtypes = [_('found in system'), _('found in repos'), + _('found in the AUR') ] aurbuild = [] if deps == {}: - fancy_msg2('none found') + fancy_msg2(_('none found')) for pkg, pkgtype in deps.items(): if pkgtype == -1: - raise PBError("[ERR3201] depcheck: cannot find \ -{0} anywhere".format(dep)) + raise PBError(_('[ERR3201] depcheck: cannot find \ +{0} anywhere').format(dep)) if pkgtype == 2: aurbuild.append(pkg) - fancy_msg2("{0}: found in {1}".format(pkg, + fancy_msg2('{0}: {1}'.format(pkg, pkgtypes[pkgtype])) if aurbuild != []: return [2, aurbuild] except UnicodeDecodeError as inst: - fancy_error2('[ERR3202] depcheck: UnicodeDecodeError. \ - The PKGBUILD cannot be read. There are invalid UTF-8 characters (eg. \ -in the Maintainer field.) Error message: '+str(inst)) + fancy_error2(_('[ERR3202] depcheck: UnicodeDecodeError.\ + The PKGBUILD cannot be read. There are invalid UTF-8 characters (eg. \ +in the Maintainer field.) Error message: {0}').format(str(inst))) asroot = '' if os.geteuid() == 0: @@ -485,9 +496,7 @@ def build_runner(self, package): class Upgrade: """Tools for performing an upgrade.""" def __init__(self): - """ - Class init. - """ + """Class init.""" self.aur = AUR() self.build = Build() pycman.config.init_with_config('/etc/pacman.conf') @@ -516,10 +525,12 @@ def gather_foreign_pkgs(self): return foreign def list_upgradeable(self, pkglist): - """Compares package versions. + """ + Compares package versions. Input: a list of packages to be compared. suggestion: self.gather_foreign_pkgs().keys() - Returns: a list of packages with newer versions in the AUR.""" + Returns: a list of packages with newer versions in the AUR. + """ aurlist = self.aur.multiinfo(pkglist)['results'] # It's THAT easy. # Oh, and by the way: it is much, MUCH faster than others. @@ -534,23 +545,25 @@ def list_upgradeable(self, pkglist): return upgradeable def auto_upgrade(self): - """Upgrades packages. Simillar to Build.auto_build(). - Notice: things break here A LOT. Perform twice if you can.""" + """ + Upgrades packages. Simillar to Build.auto_build(). + Notice: things break here A LOT. Perform twice if you can. + """ pblog('Ran auto_upgrade.') - fancy_msg('Gathering data about packages...') + fancy_msg(_('Gathering data about packages...')) foreign = self.gather_foreign_pkgs() upgradeable = self.list_upgradeable(foreign.keys()) upglen = len(upgradeable) - fancy_msg('{0} upgradeable packages found:'.format(upglen)) + fancy_msg(_('{0} upgradeable packages found:').format(upglen)) if upglen == 0: - fancy_msg2('there is nothing to do') + fancy_msg2(_('there is nothing to do')) return 0 fancy_msg2(' '.join(upgradeable)) query = (DS.colors['green']+'==>'+DS.colors['all_off']+ - DS.colors['bold']+' '+'Proceed with installation? [Y/n] '+ - DS.colors['all_off']) + DS.colors['bold']+' '+_('Proceed with installation? \ +[Y/n] ')+DS.colors['all_off']) yesno = input(query) yesno = yesno + ' ' # cheating... if yesno[0] == 'n' or yesno[0] == 'N': @@ -558,7 +571,7 @@ def auto_upgrade(self): else: pyalpm.release() for package in upgradeable: - pblog('Building '+package) + pblog('Building {0}'.format(package)) self.build.auto_build(package, DS.validate) pblog('Initialized.') @@ -566,37 +579,37 @@ def auto_upgrade(self): def main_routine(): """Main routine. Usage: main_routine(sys.argv)""" pblog('Running argparse.') - parser = argparse.ArgumentParser(description="A python3 AUR helper \ -(sort of.) Wrapper-friendly (pacman-like output.)", epilog="You can use \ -pacman syntax if you want to.") + parser = argparse.ArgumentParser(description=_('A python3 AUR helper \ +(sort of.) Wrapper-friendly (pacman-like output.)'), epilog=_('You can \ +use pacman syntax if you want to.')) parser.add_argument('-v', '--version', action='version', version='PKGBUILDer '+VERSION) - parser.add_argument('pkgs', metavar="PACKAGE", action='store', - nargs='*', help="packages to build") + parser.add_argument('pkgs', metavar='PACKAGE', action='store', + nargs='*', help=_('packages to build')) argopt = parser.add_argument_group('options') argopr = parser.add_argument_group('operations') argopt.add_argument('-C', '--nocolor', action='store_false', - default=True, dest='color', help="don't use \ - colors in output") + default=True, dest='color', help=_('don\'t use \ + colors in output')) argopt.add_argument('-S', '--sync', action='store_true', default=False, - dest='pac', help="pacman syntax compatiblity") + dest='pac', help=_('pacman syntax compatiblity')) argopt.add_argument('-V', '--novalidation', action='store_false', - default=True, dest='valid', help="don't check if \ - packages were installed after build") + default=True, dest='valid', help=_('don\'t check \ + if packages were installed after build')) argopt.add_argument('-y', '--refresh', action='store_true', - default=False, dest='pacupd', help="pacman \ - syntax compatiblity") + default=False, dest='pacupd', help=_('pacman \ + syntax compatiblity')) argopr.add_argument('-i', '--info', action='store_true', default=False, - dest='info', help="show package info") + dest='info', help=_('view package information')) argopr.add_argument('-s', '--search', action='store_true', - default=False, dest='search', help="search for a \ - package") + default=False, dest='search', help=_('search the \ + AUR for matching strings')) argopr.add_argument('-u', '--sysupgrade', action='store_true', default=False, dest='upgrade', - help="upgrade installed AUR packages") + help=_('upgrade installed AUR packages')) args = parser.parse_args() DS.validate = args.valid @@ -615,11 +628,12 @@ def main_routine(): for ipackage in args.pkgs: ipkg = utils.info(ipackage) if ipkg == False: - raise PBError('Package {0} not found.'.format(ipackage)) - - print("""Category : {0} + raise PBError(_('Package {0} not found.').format( + ipackage)) + ### TRANSLATORS: space it properly. `yes/no' below are + ### for `out of date'. + print(_("""Category : {0} Name : {1} -Version 2.1.1.3 URL : {3} Licenses : {4} Votes : {5} @@ -628,15 +642,15 @@ def main_routine(): Last Updated : {8} First Submitted: {9} Description : {10} -""".format(DS.categories[int(ipkg['CategoryID'])], ipkg['Name'], - ipkg['Version'], ipkg['URL'], ipkg['License'], ipkg['NumVotes'], - DS.colors['red']+'yes'+DS.colors['all_off'] if (ipkg['OutOfDate'] - == '1') else 'no', ipkg['Maintainer'], - datetime.datetime.fromtimestamp(float( - ipkg['LastModified'])).strftime('%a %d %b %Y %H:%m:%S %p %Z'), - datetime.datetime.fromtimestamp(float( - ipkg['FirstSubmitted'])).strftime('%a %d %b %Y %H:%m:%S %p %Z'), - ipkg['Description'])) +""").format(DS.categories[int(ipkg['CategoryID'])], ipkg['Name'], + ipkg['Version'], ipkg['URL'], ipkg['License'], ipkg['NumVotes'], + DS.colors['red']+_('yes')+DS.colors['all_off'] if ( + ipkg['OutOfDate'] == '1') else _('no'), ipkg['Maintainer'], + datetime.datetime.fromtimestamp(float( + ipkg['LastModified'])).strftime('%a %d %b %Y %H:%m:%S %p %Z'), + datetime.datetime.fromtimestamp(float( + ipkg['FirstSubmitted'])).strftime('%a %d %b %Y %H:%m:%S %p \ +%Z'), ipkg['Description'])) exit(0) if args.search == True: @@ -644,15 +658,15 @@ def main_routine(): if len(searchstring) < 3: # this would be too many entries. The API is really # having this limitation, though. - fancy_error('ERR5002: search string too short, API \ -limitation') - fancy_msg('Searching for exact match...') + fancy_error(_('[ERR5002] search string too short, API \ +limitation')) + fancy_msg(_('Searching for exact match...')) pkgsearch = [utils.info(searchstring)] # workaround if pkgsearch == [False]: - fancy_msg2('not found') + fancy_msg2(_('not found')) exit(0) else: - fancy_msg2('found') + fancy_msg2(_('found')) else: pkgsearch = utils.search(searchstring) # pacman behavior for spackage in pkgsearch: @@ -683,7 +697,7 @@ def main_routine(): # If we didn't exit, we shall build the packages. pblog('Ran through all the addon features, building...') for bpackage in args.pkgs: - pblog('Building '+bpackage) + pblog('Building {0}'.format(bpackage)) build.auto_build(bpackage, args.valid) pblog('Quitting.') diff --git a/setup.py b/setup.py index dd88aa9..493658c 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup(name='pkgbuilder', - version='2.1.1.3', + version='2.1.1.4', description='An AUR helper (and library) in python3', author='Kwpolska', author_email='kwpolska@kwpolska.tk', @@ -26,6 +26,7 @@ py_modules=['pkgbuilder'], scripts=['scripts/pkgbuilder'], data_files=[ - ('share/man/man8', ['docs/pkgbuilder.8.gz']) + ('share/man/man8', ['docs/pkgbuilder.8.gz']), + ('share', ['locale']) ] )
    [5002]occurs, when your search string is shorter than 3 letters. +
    [5002]occurs, when your search string is shorter than 3 letters. The AUR API ignores these requests. However, the script searches for an exact match. If one is found, it is being shown.
    Copyright:This document has been placed in the public domain.
    Date:2011-10-04
    Date:2011-10-07
    Version:2.1.1.3
    Version:2.1.1.4
    Manual section:8