Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving build problems and english language #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

GliderGeek
Copy link

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

@GliderGeek
Copy link
Author

This solves issues #4 and #18

@GliderGeek
Copy link
Author

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?

@GliderGeek
Copy link
Author

tried again: ubuntu chrome and firefox. it is not working without the en.json file.

@Turbo87
Copy link
Contributor

Turbo87 commented Jan 17, 2016

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?

@GliderGeek
Copy link
Author

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'))

@Turbo87
Copy link
Contributor

Turbo87 commented Jan 18, 2016

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

@GliderGeek
Copy link
Author

But this is already the case for all other languages right?

@Turbo87
Copy link
Contributor

Turbo87 commented Jan 18, 2016

with the exception that for those it is necessary 😉

@TobiasLohner
Copy link
Owner

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.
skylines_task

@GliderGeek
Copy link
Author

That looks very nice @TobiasLohner! Will it also be possible to upload a cup file?

@fb fb mentioned this pull request Jun 17, 2018
fb added a commit to fb/proSoar that referenced this pull request Jun 17, 2018
No link tag is inserted if 'en' is preferred locale.

related to TobiasLohner#18 and TobiasLohner#19
@fb fb mentioned this pull request Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants