proSoar
proSoar copied to clipboard
Solving build problems and english language
There were some steps missing in the build process and some errors:
- missing packages in ubuntu
- deprecated skylines url
- missing english language .po file
- mootools core package download location These are fixed with these commits
This solves issues #4 and #18
seems a reasonable approach indeed. the issue remains of the mixed english/germand text on the hosted version though. could this be because of these defaults handling?
tried again: ubuntu chrome and firefox. it is not working without the en.json file.
my guess is indeed that in these cases german strings were used as the original strings which is obviously wrong. if that is not the case then there must be a problem somewhere else but I'm reasonably certain by now that the en.json
file should not be needed.
FYI other translation tools use IDs instead of translatable strings and in these cases you will need a dedicated ID-to-English conversion. gettext however is not using IDs so we shouldn't need it here.
@TobiasLohner any comments on this?
what's the downside of creating an en.json file? i understand that it is undesirable to create an extra en.po file, but it is possible to create the en.json file from the messages.pot file:
# prepare translations
print "Converting .po to .json and copying them to " + web_temp_dir
translations_folder = os.path.join('..', 'prosoar', 'translations')
for translation in os.listdir(translations_folder):
if translation == 'messages.pot':
po_file = os.path.join(translations_folder,'messages.pot')
translation = 'en'
elif len(translation) != 2:
continue
else:
po_file = os.path.join(translations_folder, translation,'LC_MESSAGES', 'messages.po')
result = u'{"%s":%s}' % (translation, pojson.convert(po_file))
path = os.path.join(web_temp_dir, 'LC_MESSAGES', translation + '.json')
file(path, 'w').write(result.encode('utf-8'))
the downside is that more information has to be downloaded by the client's browser and in this case it is unnecessary because all the information already exists
But this is already the case for all other languages right?
with the exception that for those it is necessary :wink:
Thanks for your contributions, but I probably won't merge them as I'm currently working on a task planner for SkyLines and would abandon proSoar instead.
It's not finished yet but it's not far until we have the features proSoar has.
That looks very nice @TobiasLohner! Will it also be possible to upload a cup file?