Comments (8)
Updated the CHANGELOG (1f3087b)
from pagy.
Thanks for the explanation. Then it looks like you are using the i18n
extra... and I just understood that my doc is not clear enough then :).
I will update also the initializer_example.rb
to make it more clear.
You don't need that 2 lines if you use the i18n
extra, because your app is using the canonical I18n gem included as a dependency of rails, hence that 2 lines are totally ignored by the I18n gem.
from pagy.
Hi @msdundar
sorry for the issue, but there have been some simple to fix breaking changes in version 0.11.0. Please, follow the CHANGELOG link to update. Please, let me know if I can help.
Besides, I just noticed that the CHANGELOG missed to report to update also the initializer file. I will fix the CHANGELOG.
Thanks
from pagy.
@msdundar
I saw that you are using a custom language. The new Pagy version has been refactored in order to better support custom i18n, especially with regard to multiple languages and relative pluralization.
If the file you are using is generic (i.e. suitable for general use), then you could add your language to the bottom of the pagy.yml file and create a pull request. ;)
If your language doesn't use the same "en"
default pluralization types (i.e. 'zero', 'one', 'other'), you should also add a proc in the plurals.rb, so it will be properly pluralized by pagy i18n.
Please, let me know if I can help. Thanks
from pagy.
Thanks for your quick reply, detailed explanation and update on CHANGELOG.
I will make a PR for translations soon. My issue is fixed, after changing the initializer as shown below:
Pagy::Frontend::I18N.load(file:'config/locales/gems/pagy/tr.yml', language:'tr')
Pagy::Frontend::I18N.load(file:'config/locales/gems/pagy/en.yml', language:'en')
best regards.
from pagy.
I suppose that the 2 lines are from 2 apps, right? Because there is no support for dynamic translation of multiple languages in the current pagy internal i18n. And if you are using the i18n
extra (i.e. the canonical I18n gem), then that 2 lines are not used at all by the pagination.
from pagy.
In fact, they are from the same application and it worked well :) I am not using any additional translation-globalization GEMs, just default i18n bundled with Rails and ActiveSupport. When I switch between locales I can see the translated pagination texts without any problems.
from pagy.
Updated initializer_example.rb (cdab354)
from pagy.
Related Issues (20)
- Add ARIA attributes to bulma helpers
- Add ARIA attributes to foundation helpers
- Add ARIA attributes to materialize helpers
- Add ARIA attributes to semantic helper
- Add ARIA attributes to uikit helper
- Bug: pagy_search wrong number of arguments HOT 10
- Bug: Alias for an aggregate result is removed HOT 9
- Bug: Issue with Arel scope passed to pagy method HOT 3
- Docs: 7.0 has an undocumented breaking change for active page styling HOT 5
- Docs: Which branch should PRs be made against? HOT 3
- Docs: Update performance metrics HOT 5
- Trim doesn't call with pagy_nav_js when first page is active
- Bug: Adapt with Mongoid add extention HOT 1
- Bug: Pagy::Backend#pagy_get_vars `count_args` gets ignored HOT 3
- Docs: https://ddnexus.github.io/pagy/quick-start/#configure HOT 1
- Bug: Missing initializer in documentation HOT 1
- Bug: wrong number of arguments (given 2, expected 0) HOT 2
- Bug: wrong number of arguments (given 2, expected 0) HOT 1
- Bug: Pagy not working with Geocoder gem
- Bug: Undocumented backwards-incompatible change of empty "page" parameter introduced in 6.4.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pagy.