fizyk / pyramid_localize Goto Github PK
View Code? Open in Web Editor NEWPackage to provide translation methods for pyramid, and means to reload translations without stopping the application
License: MIT License
Package to provide translation methods for pyramid, and means to reload translations without stopping the application
License: MIT License
Create a simple textarea editor for .po files
Each .po file would be opened in textarea field with save button which will write modified data back into .po file.
Store a backup copy as well and create a button to revert to recent backup.
Add tests, and bring test coverage at least to 60% before the release
Rewrite tests into pytest framewrok.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
towncrier
it's the only major element missing in documentation
It's better to use the unittest module instead of going for assert and == while testing.
Page might have different slug (not onky the language prefix might differ).
There should be possibility to create a collection of urls for given route leading to same destination, but in different language.
Preferably, all these links should be injected into document's head with
<link rel="alternate" hreflang="<locale>" type="text/html" href="<translated_uri>"/>
Idea is to have a translation mixin that will be able to extend model dev want to have tranmslated with submodel that will take some of the fields from master model, and adds relation to master model and to pyramid_localize.models.Language to detect a language. We would have to mark some fields as translatable on master model (new field type?)
Rough idea of how it should look like within python
class Post(LocalizeMixin, Base):
# ....
post = Post()
assert isinstance(post.translations[0], Post.I18n)
Both Post and Post.I18n should be valid sqlalchemy.
Also Post should retrieve getitme method, that would return requested translation,
post = Post()
assert isinstance(post['en'], Post,I18n)
Integrate pycountry into the locale model, we should be able to return data from pycountry, throu Language model (specific data based on the Language instance - language_code dependant)
It is common pattern to carry the content language in URL as /en/foobar
style path. This strategy is recommended by search engines. This might make sense to be included in pyramid_localize, so I am opening the discussion here.
Here is a preliminary gist if one wants to try out this: https://gist.github.com/miohtama/b93fd1ab11353f86e2da2b484d761358
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.