Update rocket_i18n and add gettext_macros #431

Merged
elegaanz merged 9 commits from update-i18n into master 5 years ago
elegaanz commented 5 years ago (Migrated from github.com)

Internationalization now uses proc-macros that generate the .pot file
automatically.

Internationalization now uses proc-macros that generate the .pot file automatically.
codecov[bot] commented 5 years ago (Migrated from github.com)

Codecov Report

Merging #431 into master will decrease coverage by 0.47%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
- Coverage   25.92%   25.45%   -0.48%     
==========================================
  Files          63       63              
  Lines        6106     6220     +114     
==========================================
  Hits         1583     1583              
- Misses       4523     4637     +114
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/431?src=pr&el=h1) Report > Merging [#431](https://codecov.io/gh/Plume-org/Plume/pull/431?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/5880dc1957a60b3fe362bcfe0e978502bff7fb41?src=pr&el=desc) will **decrease** coverage by `0.47%`. > The diff coverage is `0%`. ```diff @@ Coverage Diff @@ ## master #431 +/- ## ========================================== - Coverage 25.92% 25.45% -0.48% ========================================== Files 63 63 Lines 6106 6220 +114 ========================================== Hits 1583 1583 - Misses 4523 4637 +114 ```
Owner

I'm getting

GET / text/html:
    => Matched: GET / (index)
    => Error: Attempted to retrieve unmanaged state!
thread '<unnamed>' panicked at 'Outcome::expect() failed: Couldn't retrieve translations because they are not managed by Rocket.', /home/trinity/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.0/src/outcome.rs:185:18
note: Run with `RUST_BACKTRACE=1` for a backtrace.

on every page. Any idea on what I did wrong? (or does it not work??)

I'm getting ```rust GET / text/html: => Matched: GET / (index) => Error: Attempted to retrieve unmanaged state! thread '<unnamed>' panicked at 'Outcome::expect() failed: Couldn't retrieve translations because they are not managed by Rocket.', /home/trinity/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.0/src/outcome.rs:185:18 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` on every page. Any idea on what I did wrong? (or does it not work??)
elegaanz commented 5 years ago (Migrated from github.com)

I didn't have this error, but I'll try to reproduce it.

I didn't have this error, but I'll try to reproduce it.
Owner

include_i18n! returns a Translation according to docs, but routes try to load an I18n, that may be the issue, but I don't know how you can not get the error

`include_i18n!` returns a `Translation` according to docs, but routes try to load an `I18n`, that may be the issue, but I don't know how you can not get the error
elegaanz commented 5 years ago (Migrated from github.com)

I18n is just a request guard that selects the correct Catalog for a given request, from the list of managed ones (Translation), so I don't think it's here that the issue is.

`I18n` is just a request guard that selects the correct `Catalog` for a given request, from the list of managed ones (`Translation`), so I don't think it's here that the issue is.
elegaanz commented 5 years ago (Migrated from github.com)

I can indeed reproduce. I'll try to fix the issue.

I can indeed reproduce. I'll try to fix the issue.
elegaanz commented 5 years ago (Migrated from github.com)

Ok, so the issue was just that I tested with my local version of gettext-macros, but there were a few changes that were not yet on crates.io.

I'll try to fix the conflict now…

Ok, so the issue was just that I tested with my local version of gettext-macros, but there were a few changes that were not yet on crates.io. I'll try to fix the conflict now…
trinity-1686a reviewed 5 years ago
Owner

I don't know what buildconfig is for, but it seems quiet tied to your specific configuration, can't it be made otherwise?

I don't know what buildconfig is for, but it seems quiet tied to your specific configuration, can't it be made otherwise?
trinity-1686a reviewed 5 years ago
trinity-1686a left a comment
Owner

Seems good to me.
The buildconfig thing is already on master so it's not blocking

Seems good to me. The buildconfig thing is already on master so it's not blocking
elegaanz (Migrated from github.com) reviewed 5 years ago
elegaanz (Migrated from github.com) commented 5 years ago

It is a file added by GNOME Builder I think… I should probably .gitignore it

It is a file added by GNOME Builder I think… I should probably .gitignore it
trinity-1686a approved these changes 5 years ago
trinity-1686a left a comment
Owner

👍

:+1:

Reviewers

trinity-1686a approved these changes 5 years ago
The pull request has been merged as 7eef4643c8.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b update-i18n master
git pull origin update-i18n

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff update-i18n
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#431
Loading…
There is no content yet.