Update rocket_i18n and add gettext_macros #431

Merged
elegaanz merged 9 commits from update-i18n into master 2019-02-02 14:23:51 +00:00
elegaanz commented 2019-01-20 18:08:45 +00:00 (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 2019-01-20 19:26:24 +00:00 (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 ```

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 2019-01-27 10:23:22 +00:00 (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.

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 2019-01-27 13:23:38 +00:00 (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 2019-01-27 14:08:23 +00:00 (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 2019-01-28 12:11:39 +00:00 (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 2019-01-31 08:15:02 +00:00

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 2019-01-31 08:33:12 +00:00
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 2019-01-31 11:46:17 +00:00
elegaanz (Migrated from github.com) commented 2019-01-31 11:46:17 +00:00

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 2019-02-02 13:49:56 +00:00
trinity-1686a left a comment
Owner

👍

:+1:
Sign in to join this conversation.
No reviewers
No milestone
No project
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
No description provided.