Ignore comments in Fluent source code

finchie
Aug 2, 2024, 6:41 AM
7FYXVNAB6JAP3CJKE4MY57UWYSUPEXFVER6K264BSKYHVU6V4SGQC

Dependencies

  • [2] AAERM7PB Add selector tests for the `fr` locale
  • [3] 2SITVDYW Handle common errors in Fluent code
  • [4] 6ABVDTXZ Improve `fluent_embed_derive` test suite
  • [5] XEEXWJLG Add simple end-to-end test for selectors
  • [6] VNSHGQYN Support using glob paths in `localize` macro
  • [7] CESJ4CTO Move macro-specific code into `macro_impl` module
  • [8] QFPQZR4K Refactor `fluent_embed`
  • [9] OWXLFLRM Merge `cli_macros` shim into `fluent_embed`

Change contents

  • replacement in fluent_embed_derive/tests/selectors.rs at line 1
    [3.140][3.141:242]()
    //! A basic end-to-end test for the example at https://projectfluent.org/fluent/guide/selectors.html
    [3.140]
    [3.242]
    //! End-to-end tests for the example at https://projectfluent.org/fluent/guide/selectors.html
  • replacement in fluent_embed_derive/tests/selectors.rs at line 9
    [3.952][3.376:396](),[3.376][3.376:396]()
    pub enum Messages {
    [3.952]
    [3.396]
    pub enum Message {
  • replacement in fluent_embed_derive/tests/selectors.rs at line 13
    [3.615][2.108:124]()
    impl Messages {
    [3.615]
    [2.124]
    impl Message {
  • replacement in fluent_embed_derive/tests/selectors.rs at line 41
    [2.1190][3.315:366](),[3.315][3.315:366]()
    let data = Messages::Emails { unread_emails };
    [2.1190]
    [2.1249]
    let data = Message::Emails { unread_emails };
  • edit in fluent_embed_derive/tests/locale/en-US/selectors.ftl at line 1
    [3.1152]
    [3.1153]
    # Selectors example from Fluent guide: https://projectfluent.org/fluent/guide/selectors.html
  • edit in fluent_embed_derive/src/fluent/mod.rs at line 110
    [3.2667][3.2667:2818]()
    Entry::Comment(_) => todo!(),
    Entry::GroupComment(_) => todo!(),
    Entry::ResourceComment(_) => todo!(),
  • edit in fluent_embed_derive/src/fluent/mod.rs at line 111
    [3.2865]
    [3.2865]
    // Ignore comments
    Entry::Comment(_) | Entry::GroupComment(_) | Entry::ResourceComment(_) => continue,