Skip to content

Instantly share code, notes, and snippets.

@pyropeter
Created September 26, 2010 14:50
Show Gist options
  • Save pyropeter/597985 to your computer and use it in GitHub Desktop.
Save pyropeter/597985 to your computer and use it in GitHub Desktop.
AUR: that language stuff
#! /usr/bin/python -O
# -*- coding: utf-8 -*-
from findkeys import findkeys
from parsepo import parseall
def dings():
used = findkeys()
translations, langs = parseall()
for key, files in used.iteritems():
translations.setdefault(key, {})[0] = files
return translations, langs
if __name__ == "__main__":
keys,langs = dings()
print "===== Unused translations ===================================="
print
for key in [x for x in keys.keys()
if not keys[x].get(0, False)]:
print key
print
print
print "===== Completely missing translations ========================"
print
for key in [x for x in keys.keys()
if keys[x].get(0, False)
if len(keys[x]) == 1]:
print key
print
print
print "===== Partially missing translations ========================="
print
for lang in langs:
print "=== %s ==="%lang
for key in [x for x in keys.keys()
if keys[x].get(0, False)
if len(keys[x]) != 1
if not keys[x].get(lang, False)]:
print key
print
print
#! /usr/bin/python -O
# -*- coding: utf-8 -*-
# This script iterates through the script directories
# looking for php scripts that contain __() functions.
#
"""
Bugs:
* does parse comments (Bob still has apples)
* does not handle escape sequences correctly when string is enclosed
in ticks (like in __('foo'))
"""
import re
import os
import sys
fileRegex = re.compile(r"\.(php|inc)$")
keyRegex = re.compile(r"""__\(\s*["'](.*?)(?<!\\)["']\s*[),]""")
root = re.sub(r"/lang$", "", os.getcwd())
def findkeys():
keys = {}
for curdir,dirs,files in os.walk(root):
#print "Dir: %s"%curdir
for filename in files:
if fileRegex.search(filename):
#print "Parsing %s"%(filename)
f = open(os.path.join(curdir, filename))
for match in keyRegex.finditer(f.read()):
keys.setdefault(match.group(1), set()).add(filename)
f.close()
for key,files in keys.iteritems():
keys[key] = list(files)
return keys
if __name__ == "__main__":
keys = findkeys()
for key, files in keys.iteritems():
print '%s'%(key)
for filename in files:
print " * %s"%(filename)
print
===== Unused translations ====================================
Unflag Safe
string
You did not select any packages to disowned.
Under construction...
After that, this can be filled in with more meaningful text.
%s: An ArchLinux project
Go back to %hsearch results%h.
Regular users can edit their own account.
Flagged as safe by me
Missing pkgdesc variable in PKGBUILD.
Package upload successful.
Flag Safe
Email address
Out-of-date
This address is already in use.
Un-Vote
O%hut-of-Date
You must supply a comment for this upload/change.
IRC Nick:
User Statistics
Proposal:
Go back to %hpackage details view%h.
Notify:
Package names do not match.
Welcome to the AUR! If you're a newcomer, you may want to read the %hGuidelines%h.
Language:
This is where the intro text will go.
Package Counts
You do not have access to disown packages.
Error trying to upload file - please try again.
ArchLinux User-community Repository
Account Type:
Missing arch variable in PKGBUILD.
Username:
All
Password:
Community
O%hrphan
You did not specify a package name.
Missing license variable in PKGBUILD.
Popularity
Add Comment
Latest Packages:
Toggle Notify
Normal User
Error looking up username, %s.
Upload package
None
Package name
It must be
You've already voted in this proposal.
Couldn't remove from notification list.
Out-of-Date
Logged in as: %s
Incorrect password for username %s.
Packages in unsupported and flagged as safe
It's more important to get the login functionality finished.
Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience.
If you have feedback about the AUR, please leave it in %hFlyspray%h.
Email Address:
Login failure: Bad user or pass.
Keywords
The most popular packages will be provided as binary packages in [community].
Confirm:
Missing md5sums variable in PKGBUILD.
Missing source variable in PKGBUILD.
Unsafe
Flag Package Safe To Use
Bad username or password.
Comments
Your password must be at least
You must supply a username.
Missing pkgver variable in PKGBUILD.
Missing pkgrel variable in PKGBUILD.
Overwrite existing package?
Couldn't unflag package safe.
Length in days:
Vote Actions
Account Suspended:
Couldn't flag package safe.
Could not change to directory %s.
Your account has been suspended.
Missing
Unsupported
This is a %h%s%h problem!
Voted?
Un-flag Out-of-date
You did not select any packages to un-vote for.
You have been successfully logged out.
You have been removed from the comment notification list.
Incorrect password for email address, %s.
You have been added to the comment notification list.
Manage
You must be logged in before you can cancel notification on comments.
start and end with a letter or number
Error exec'ing the mv command.
You do not have access to adopt packages.
For now, it's just a place holder.
The above files have been verified (by %h%s%h) and are safe to use.
You did not tag the 'overwrite' checkbox.
%s: %sAn ArchLinux project%s
Clear
Unflag Package Safe To Use
Error trying to generate session id.
Missing build function in PKGBUILD.
Discussion about the AUR takes place on the %sTUR Users List%s.
Email discussion about the AUR takes place on the %sTUR Users List%s.
Package Location
Missing url variable in PKGBUILD.
AUR: An ArchLinux project
You must supply an email address.
Real Name:
Missing pkgname variable in PKGBUILD.
Be careful! The above files may contain malicious code that can damage your system.
Re-type password:
Safe
Remember to vote for your favourite packages! The most popular packages are provided as binary packages in [community].
The selected packages have been unflagged safe.
Comment
The selected packages have been flagged safe.
Applicant/TU:
Unsupported PKGBUILDs are user produced content. Any use of files is at your own risk.
Hi, this is worth reading!
Add
Incorrect password for username, %s.
Flagged as safe
Binary packages and filelists are not allowed for upload.
The above files have been verified (by %s) and are safe to use.
Select Location
can contain only one period, underscore or hyphen.
You must supply a password.
New Package Notify:
===== Completely missing translations ========================
Missing %s variable in PKGBUILD.
Forgot Password
Your password has been reset successfully.
Name Only
Name, Description
Invalid e-mail.
Invalid e-mail and reset key combination.
Show all %s comments
Voters
Check your e-mail for the confirmation link.
===== Partially missing translations =========================
=== el_GR ===
Age
Last Updated
License
Sources
First Submitted
Previous
unknown
Comment by: %s on %s
Legend
Enter your comment below.
Applicant/TU
Comment has been added.
Length in days
Submitter
=== sr ===
This is a %hmajor%h problem!
Password Reset
Confirm your new password:
Enter your new password:
Previous
Upload your source packages here. Create source packages with `makepkg --source`.
Comment by: %s on %s
Enter your e-mail address:
Add Proposal
Applicant/TU
Confirm your e-mail address:
Confirm
Comment has been added.
The selected packages have not been deleted, check the confirmation checkbox.
Length in days
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== nb_NO ===
Remember to vote for your favourite packages!
This is a %hmajor%h problem!
Ascending
Password Reset
Age
Confirm your new password:
Last Updated
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
License
Registered Users
Sources
First Submitted
Enter your new password:
Previous
Statistics
Upload your source packages here. Create source packages with `makepkg --source`.
unknown
DISCLAIMER
Comment by: %s on %s
Packages added or updated in the past 7 days
Legend
My Statistics
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
Enter your comment below.
Enter your e-mail address:
Add Proposal
Applicant/TU
Trusted Users
Descending
Confirm your e-mail address:
Confirm
Comment has been added.
The selected packages have not been deleted, check the confirmation checkbox.
Recent Updates
Length in days
Submitter
Out of Date
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== pt ===
This vote is still running.
This is a %hmajor%h problem!
Remember me
Start and end with a letter or number
Password Reset
You have been removed from the comment notification list for %s.
Back
It must be between %s and %s characters long
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Username does not exist.
Can contain only one period, underscore or hyphen.
Enter your new password:
%s already has proposal running for them.
Previous
End
Next
Upload your source packages here. Create source packages with `makepkg --source`.
This package has been flagged out of date.
(empty if not applicable)
No results found.
Start
Proposal cannot be empty.
DISCLAIMER
Your password must be at least %s characters.
%s has %s apples.
Abstain
Could not chmod directory %s.
You have been added to the comment notification list for %s.
Legend
Could not retrieve proposal details.
(defaults to 7 if empty)
Advanced
Vote ID not valid.
New proposal submitted.
UnFlag Out-of-date
Enter your e-mail address:
Required by
Add Proposal
Showing results %s - %s of %s
Applicant/TU
Proposal
UnVote
Length must be a number.
Submit a proposal to vote on.
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Confirm
The username is invalid.
The selected packages have not been deleted, check the confirmation checkbox.
Current Votes
All Votes
Length in days
Voting is closed for this proposal.
You've already voted for this proposal.
You cannot vote in an proposal about you.
Out of Date
Length must be at least 1.
=== zh_CN ===
This is a %hmajor%h problem!
Password Reset
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Enter your new password:
Previous
Upload your source packages here. Create source packages with `makepkg --source`.
%s has %s apples.
Enter your e-mail address:
Add Proposal
Applicant/TU
Confirm your e-mail address:
Confirm
Comment has been added.
The selected packages have not been deleted, check the confirmation checkbox.
Length in days
=== es ===
This vote is still running.
This is a %hmajor%h problem!
Remember me
Start and end with a letter or number
Password Reset
You have been removed from the comment notification list for %s.
Back
It must be between %s and %s characters long
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Username does not exist.
Can contain only one period, underscore or hyphen.
Enter your new password:
%s already has proposal running for them.
Previous
End
Next
Upload your source packages here. Create source packages with `makepkg --source`.
This package has been flagged out of date.
(empty if not applicable)
No results found.
Start
Proposal cannot be empty.
DISCLAIMER
Your password must be at least %s characters.
%s has %s apples.
Abstain
Could not chmod directory %s.
You have been added to the comment notification list for %s.
Legend
My Statistics
Could not retrieve proposal details.
(defaults to 7 if empty)
Advanced
Vote ID not valid.
New proposal submitted.
UnFlag Out-of-date
Enter your e-mail address:
Required by
Add Proposal
Showing results %s - %s of %s
Applicant/TU
Proposal
UnVote
Length must be a number.
Submit a proposal to vote on.
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Confirm
The username is invalid.
The selected packages have not been deleted, check the confirmation checkbox.
Current Votes
All Votes
Length in days
Voting is closed for this proposal.
You've already voted for this proposal.
You cannot vote in an proposal about you.
Out of Date
Length must be at least 1.
=== ru ===
This is a %hmajor%h problem!
Password Reset
Confirm your new password:
Enter your new password:
Upload your source packages here. Create source packages with `makepkg --source`.
Enter your e-mail address:
Add Proposal
Confirm your e-mail address:
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
=== pl ===
This vote is still running.
This is a %hmajor%h problem!
Remember me
Start and end with a letter or number
Password Reset
Back
It must be between %s and %s characters long
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Username does not exist.
Can contain only one period, underscore or hyphen.
Enter your new password:
%s already has proposal running for them.
Previous
End
Next
Upload your source packages here. Create source packages with `makepkg --source`.
(empty if not applicable)
No results found.
Start
Proposal cannot be empty.
Your password must be at least %s characters.
Logged-in as: %s
%s has %s apples.
Abstain
Could not chmod directory %s.
Legend
Could not retrieve proposal details.
(defaults to 7 if empty)
Advanced
Vote ID not valid.
New proposal submitted.
UnFlag Out-of-date
Enter your e-mail address:
Add Proposal
Applicant/TU
Proposal
UnVote
Length must be a number.
Submit a proposal to vote on.
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
Current Votes
All Votes
Length in days
Voting is closed for this proposal.
You've already voted for this proposal.
You cannot vote in an proposal about you.
Length must be at least 1.
=== de ===
This vote is still running.
This is a %hmajor%h problem!
Remember me
Start and end with a letter or number
Password Reset
You have been removed from the comment notification list for %s.
Back
It must be between %s and %s characters long
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Username does not exist.
Can contain only one period, underscore or hyphen.
Enter your new password:
%s already has proposal running for them.
Previous
End
Next
Upload your source packages here. Create source packages with `makepkg --source`.
(empty if not applicable)
No results found.
Start
Proposal cannot be empty.
Your password must be at least %s characters.
%s has %s apples.
Abstain
Could not chmod directory %s.
You have been added to the comment notification list for %s.
Legend
Could not retrieve proposal details.
(defaults to 7 if empty)
Advanced
Vote ID not valid.
New proposal submitted.
UnFlag Out-of-date
Enter your e-mail address:
Add Proposal
Showing results %s - %s of %s
Applicant/TU
Proposal
UnVote
Length must be a number.
Submit a proposal to vote on.
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Confirm
The username is invalid.
The selected packages have not been deleted, check the confirmation checkbox.
Current Votes
All Votes
Length in days
Voting is closed for this proposal.
You've already voted for this proposal.
You cannot vote in an proposal about you.
Out of Date
Length must be at least 1.
=== cs ===
Remember to vote for your favourite packages!
This is a %hmajor%h problem!
Ascending
Password Reset
Age
Confirm your new password:
Last Updated
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
License
Registered Users
Sources
First Submitted
Enter your new password:
Previous
Statistics
Upload your source packages here. Create source packages with `makepkg --source`.
unknown
DISCLAIMER
Comment by: %s on %s
Packages added or updated in the past 7 days
Legend
My Statistics
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
Enter your comment below.
Enter your e-mail address:
Add Proposal
Applicant/TU
Trusted Users
Descending
Confirm your e-mail address:
Confirm
Comment has been added.
The selected packages have not been deleted, check the confirmation checkbox.
Recent Updates
Length in days
Submitter
Out of Date
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== tr ===
This is a %hmajor%h problem!
Password Reset
Confirm your new password:
Enter your new password:
Previous
Upload your source packages here. Create source packages with `makepkg --source`.
Legend
Advanced
Enter your e-mail address:
Add Proposal
Applicant/TU
Confirm your e-mail address:
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
Length in days
=== it ===
This is a %hmajor%h problem!
Remember me
Password Reset
Confirm your new password:
Enter your new password:
Previous
Upload your source packages here. Create source packages with `makepkg --source`.
Enter your e-mail address:
Add Proposal
Applicant/TU
Confirm your e-mail address:
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
Length in days
=== ro ===
Remember to vote for your favourite packages!
This is a %hmajor%h problem!
Ascending
Password Reset
Age
Confirm your new password:
Last Updated
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
License
Registered Users
Sources
First Submitted
Enter your new password:
Previous
Statistics
Upload your source packages here. Create source packages with `makepkg --source`.
unknown
DISCLAIMER
Comment by: %s on %s
Packages added or updated in the past 7 days
Legend
My Statistics
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
Enter your comment below.
Enter your e-mail address:
Add Proposal
Applicant/TU
Trusted Users
Descending
Confirm your e-mail address:
Confirm
Comment has been added.
The selected packages have not been deleted, check the confirmation checkbox.
Recent Updates
Length in days
Submitter
Out of Date
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== uk ===
Search by
Remember to vote for your favourite packages!
This vote is still running.
This is a %hmajor%h problem!
Remember me
Ascending
Password Reset
Age
Back
Confirm your new password:
Orphans
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
Registered Users
Username does not exist.
Enter your new password:
Sort order
%s already has proposal running for them.
Previous
Statistics
End
Next
Upload your source packages here. Create source packages with `makepkg --source`.
(empty if not applicable)
No results found.
Start
Proposal cannot be empty.
DISCLAIMER
Search
Bugs
Logged-in as: %s
%s has %s apples.
Login
Abstain
Could not chmod directory %s.
Last vote
Packages added or updated in the past 7 days
Legend
My Statistics
Could not retrieve proposal details.
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
(defaults to 7 if empty)
Per page
Advanced
Vote ID not valid.
New proposal submitted.
UnFlag Out-of-date
Discussion
Enter your e-mail address:
Logout
Add Proposal
Search Criteria
Any
Applicant/TU
Proposal
Trusted Users
Descending
UnVote
Length must be a number.
Sort by
Submit a proposal to vote on.
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Any type
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
Current Votes
All Votes
No
Recent Updates
Length in days
Voting is closed for this proposal.
You've already voted for this proposal.
Submitter
You cannot vote in an proposal about you.
Length must be at least 1.
My Packages
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== he ===
Remember to vote for your favourite packages!
Ascending
Age
Last Updated
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
License
Registered Users
Sources
First Submitted
Previous
Statistics
unknown
DISCLAIMER
Comment by: %s on %s
Packages added or updated in the past 7 days
Legend
My Statistics
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
Enter your comment below.
Applicant/TU
Trusted Users
Descending
Comment has been added.
Recent Updates
Length in days
Submitter
Out of Date
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== hu ===
Remember to vote for your favourite packages!
This is a %hmajor%h problem!
Ascending
Password Reset
Age
Confirm your new password:
Last Updated
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
License
Registered Users
Sources
First Submitted
Enter your new password:
Previous
Statistics
Upload your source packages here. Create source packages with `makepkg --source`.
unknown
DISCLAIMER
Comment by: %s on %s
Packages added or updated in the past 7 days
Legend
My Statistics
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
Enter your comment below.
Enter your e-mail address:
Add Proposal
Applicant/TU
Trusted Users
Descending
Confirm your e-mail address:
Confirm
Comment has been added.
The selected packages have not been deleted, check the confirmation checkbox.
Recent Updates
Length in days
Submitter
Out of Date
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
=== fr ===
This vote is still running.
This is a %hmajor%h problem!
Remember me
Password Reset
Confirm your new password:
Enter your new password:
Previous
End
Upload your source packages here. Create source packages with `makepkg --source`.
No results found.
Start
%s has %s apples.
Legend
Advanced
UnFlag Out-of-date
Enter your e-mail address:
Add Proposal
Applicant/TU
Proposal
UnVote
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
Length in days
=== ca ===
This vote is still running.
This is a %hmajor%h problem!
Remember me
Start and end with a letter or number
Password Reset
You have been removed from the comment notification list for %s.
Back
It must be between %s and %s characters long
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
License
Username does not exist.
Can contain only one period, underscore or hyphen.
Enter your new password:
%s already has proposal running for them.
Previous
End
Next
Upload your source packages here. Create source packages with `makepkg --source`.
This package has been flagged out of date.
(empty if not applicable)
No results found.
Start
unknown
Proposal cannot be empty.
DISCLAIMER
Your password must be at least %s characters.
%s has %s apples.
Abstain
Could not chmod directory %s.
You have been added to the comment notification list for %s.
Legend
My Statistics
Could not retrieve proposal details.
(defaults to 7 if empty)
Advanced
Vote ID not valid.
New proposal submitted.
UnFlag Out-of-date
Enter your e-mail address:
Required by
Add Proposal
Showing results %s - %s of %s
Applicant/TU
Proposal
UnVote
Length must be a number.
Submit a proposal to vote on.
Proposal Details
Total
Confirm your e-mail address:
Submitted: %s by %s
Confirm
The username is invalid.
The selected packages have not been deleted, check the confirmation checkbox.
Current Votes
All Votes
Length in days
Voting is closed for this proposal.
You've already voted for this proposal.
Submitter
You cannot vote in an proposal about you.
Out of Date
Length must be at least 1.
=== hr ===
Remember to vote for your favourite packages!
This is a %hmajor%h problem!
Ascending
Password Reset
Age
Confirm your new password:
Unsupported packages are user produced content. Any use of the provided files is at your own risk.
Some packages may be provided as binaries in [community].
Packages in unsupported
Registered Users
Enter your new password:
Previous
Statistics
Upload your source packages here. Create source packages with `makepkg --source`.
DISCLAIMER
Packages added or updated in the past 7 days
Legend
My Statistics
Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!
Enter your e-mail address:
Add Proposal
Applicant/TU
Trusted Users
Descending
Confirm your e-mail address:
Confirm
The selected packages have not been deleted, check the confirmation checkbox.
Recent Updates
Length in days
Submitter
Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.
#! /usr/bin/python -O
# -*- coding: utf-8 -*-
"""
Bugs:
* see findkeys.py for the quotings issues.
* does parse comments
"""
import re
import os
import sys
fileRegex = re.compile(r"(.*?)\.po")
root = os.getcwd()
transRegex = re.compile(r"""\$_t\["(.*?)"\] = "(.*?)";""")
def parse(filename):
keys = {}
f = open(filename)
for match in transRegex.finditer(f.read()):
keys[match.group(1)] = match.group(2)
f.close()
return keys
def parseall():
keys = {}
langs = []
for filename in os.listdir(root):
lang = fileRegex.search(filename)
if lang:
lang = lang.group(1)
langs.append(lang)
langkeys = parse(os.path.join(root, filename))
for key, value in langkeys.iteritems():
keys.setdefault(key, {})[lang] = value
return keys, langs
if __name__ == "__main__":
keys,langs = parseall()
for key, translations in keys.iteritems():
print "%s"%(key)
for lang, trans in translations.iteritems():
print " %5s: %s"%(lang, trans)
print
ca.po:2:# Catalan (Català) translation
ca.po:3:# Translator: Sergio Jovani Guzman <[email protected]>
cs.po:2:# INSTRUCTIONS TO TRANSLATORS
cs.po:3:#
cs.po:4:# This file contains the i18n translations for a subset of the
cs.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
cs.po:6:# script, and as such, you MUST pay great attention to the syntax.
cs.po:7:# If your text contains any double-quotes ("), you MUST escape
cs.po:8:# them with a backslash (\).
cs.po:9:#
cs.po:10:# Czech (česky) translation
cs.po:11:# Translator: Daniel Kozák <[email protected]>
cs.po:12:# Translator: Jaroslav Lichtblau <[email protected]>
de.po:2:# German (Deutsch) translation
de.po:3:# Translators: Pierre Schmitz <[email protected]>, Matthias Gorissen <[email protected]>, Lukas Kropatschek, Niclas Pfeifer
el_GR.po:2:# INSTRUCTIONS TO TRANSLATORS
el_GR.po:3:#
el_GR.po:4:# This file contains the i18n translations for a subset of the
el_GR.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
el_GR.po:6:# script, and as such, you MUST pay great attention to the syntax.
el_GR.po:7:# If your text contains any double-quotes ("), you MUST escape
el_GR.po:8:# them with a backslash (\).
el_GR.po:9:#
el_GR.po:10:# Greek (Ελληνικά) translation
el_GR.po:11:# Main Translator: Panos Filip <[email protected]>
el_GR.po:12:# Contributor: artem
el_GR.po:13:# Contributor: dimpard
el_GR.po:14:# Contributor: Duryodhana
el_GR.po:15:# Contributor: gtklocker
el_GR.po:16:# Contributor: paschalis.m
el_GR.po:17:# Contributor: ranger
el_GR.po:18:# Contributor: shadowman
el_GR.po:19:# Contributor: WAntilles
el_GR.po:20:# Contributor: Zaxariadis
es.po:2:# Spanish (Español) translation
es.po:3:# Translator: Víctor Martínez Romanos <[email protected]>
fr.po:2:# French (Français) translation
fr.po:3:# Translator: Morgan LEFIEUX <[email protected]>
he.po:2:# INSTRUCTIONS TO TRANSLATORS
he.po:3:#
he.po:4:# This file contains the i18n translations for a subset of the
he.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
he.po:6:# script, and as such, you MUST pay great attention to the syntax.
he.po:7:# If your text contains any double-quotes ("), you MUST escape
he.po:8:# them with a backslash (\).
he.po:9:#
he.po:10:# Hebrew (עברית) translation
he.po:11:# Translator: Netanel Shine <[email protected]>
hr.po:2:# Croatian (Hrvatski) translation
hr.po:3:# Translator: Dino Krtanjek <[email protected]>
hu.po:2:# Hungarian (Magyar) translation
hu.po:3:# Translators: Laszlo Papp <[email protected]>, Gergely Imreh <[email protected]>
it.po:2:# Italian (Italiano) translation
it.po:3:# Translators: Giovanni Scafora <[email protected]> and Pierluigi Picciau <[email protected]>
nb_NO.po:2:# INSTRUCTIONS TO TRANSLATORS
nb_NO.po:3:#
nb_NO.po:4:# This file contains the i18n translations for a subset of the
nb_NO.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
nb_NO.po:6:# script, and as such, you MUST pay great attention to the syntax.
nb_NO.po:7:# If your text contains any double-quotes ("), you MUST escape
nb_NO.po:8:# them with a backslash (\).
nb_NO.po:9:#
nb_NO.po:10:# Norwegian (Norsk) translation
nb_NO.po:11:# Translator: Hans-Kristian Arntzen <[email protected]>
pl.po:2:# Polish (Polski) translation
pl.po:3:# Translator: Jaroslaw Swierczynski <[email protected]>
pt.po:2:# INSTRUCTIONS TO TRANSLATORS
pt.po:3:#
pt.po:4:# This file contains the i18n translations for a subset of the
pt.po:5:# Arch Linux User-community Repository (AUR). This is a PHP
pt.po:6:# script, and as such, you MUST pay great attention to the syntax.
pt.po:7:# If your text contains any double-quotes ("), you MUST escape
pt.po:8:# them with the backslash character (\).
pt.po:9:#
ro.po:2:# INSTRUCTIONS TO TRANSLATORS
ro.po:3:#
ro.po:4:# This file contains the i18n translations for a subset of the
ro.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
ro.po:6:# script, and as such, you MUST pay great attention to the syntax.
ro.po:7:# If your text contains any double-quotes ("), you MUST escape
ro.po:8:# them with a backslash (\).
ro.po:9:#
ro.po:10:# Romanian (Română) translation
ro.po:11:# Translator: Bîru Ionuț Mircea <[email protected]>
ru.po:2:# Russian (Русский) translation
ru.po:3:# Translator: Sergej Pupykin <[email protected]>
sr.po:2:# INSTRUCTIONS TO TRANSLATORS
sr.po:3:#
sr.po:4:# This file contains the i18n translations for a subset of the
sr.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
sr.po:6:# script, and as such, you MUST pay great attention to the syntax.
sr.po:7:# If your text contains any double-quotes ("), you MUST escape
sr.po:8:# them with a backslash (\).
sr.po:9:#
sr.po:10:# Serbian (Srpski) translation
sr.po:11:# Translator: Slobodan Terzić <[email protected]>
tr.po:2:# INSTRUCTIONS TO TRANSLATORS
tr.po:3:#
tr.po:4:# This file contains the i18n translations for a subset of the
tr.po:5:# Arch Linux User-community Repository (AUR). This is a PHP
tr.po:6:# script, and as such, you MUST pay great attention to the syntax.
tr.po:7:# If your text contains any double-quotes ("), you MUST escape
tr.po:8:# them with the backslash character (\).
tr.po:9:#
uk.po:2:# Ukrainian (Українська) translation
uk.po:3:# Translator: sevenfourk <[email protected]>
zh_CN.po:2:# INSTRUCTIONS TO TRANSLATORS
zh_CN.po:3:#
zh_CN.po:4:# This file contains the i18n translations for a subset of the
zh_CN.po:5:# Arch Linux User Community Repository (AUR). This is a PHP
zh_CN.po:6:# script, and as such, you MUST pay great attention to the syntax.
zh_CN.po:7:# If your text contains any double-quotes ("), you MUST escape
zh_CN.po:8:# them with a backslash (\).
zh_CN.po:9:#
zh_CN.po:10:# Chinese Simplified (简体中文) translation
zh_CN.po:11:#
zh_CN.po:12:# Maintainer: Mod Gao <mod.gao |at| gmail.com>
zh_CN.po:13:# Maintainer: Huntxu <mhuntxu |at| gmail.com>
zh_CN.po:14:# Contributor: supern_lee <[email protected]>
zh_CN.po:32:# no period at last is right of this translation, dont change.
zh_CN.po:419:# new stuff that official translating material not included.
zh_CN.po:420:# new stuff that official translating material not included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment