Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

problem parsing localized release date #115

Open
bbaronSVK opened this issue Feb 19, 2019 · 1 comment
Open

problem parsing localized release date #115

bbaronSVK opened this issue Feb 19, 2019 · 1 comment
Labels
bug localization Issues related to the handling of multiple languages

Comments

@bbaronSVK
Copy link

Steps required to reproduce the problem

  1. localized publishing date - 19. února 2019 ● 14:44
  2. we use strftime but not date

Expected Result

Actual Result

Environment Info

VERSION: 0.2.0
URL: https://www.blesk.cz/clanek/celebrity-ceske-celebrity/596207/zarostly-repka-u-soudu-podminky-mu-zmenili-na-9-mesicu-natvrdo.html
RULES:

{
  "generator_name": "facebook-instant-articles-builder",
  "generator_version": "0.2.0",
  "rules": [
    {
      "class": "TextNodeRule"
    },
    {
      "class": "GlobalRule",
      "selector": "html",
      "properties": {
        "article.title": {
          "attribute": "content",
          "selector": "h1",
          "type": "element"
        },
        "article.publish": {
          "format": "d. F Y ● G:i",
          "selector": ".dateTime",
          "type": "date"
        },
        "author.name": {
          "selector": ".author",
          "type": "string"
        },
        "image.url": {
          "attribute": "src",
          "selector": ".gallery-main-container .gallery",
          "type": "string"
        },
        "article.body": {
          "attribute": "content",
          "selector": "#bbtext",
          "type": "element"
        },
        "article.canonical": {
          "attribute": "href",
          "selector": "link[rel=canonical]",
          "type": "string"
        }
      }
    },
    {
      "class": "BlockquoteRule",
      "selector": "blockquote"
    },
    {
      "class": "ParagraphRule",
      "selector": "p"
    },
    {
      "class": "H2Rule",
      "selector": "h2"
    },
    {
      "class": "H1Rule",
      "selector": "h1"
    },
    {
      "class": "ListElementRule",
      "selector": "ol, ul"
    },
    {
      "class": "ListItemRule",
      "selector": "li"
    },
    {
      "class": "AnchorRule",
      "selector": "a",
      "properties": {
        "anchor.href": {
          "attribute": "href",
          "selector": "a",
          "type": "string"
        }
      }
    },
    {
      "class": "ItalicRule",
      "selector": "i"
    },
    {
      "class": "EmphasizedRule",
      "selector": "em"
    },
    {
      "class": "BoldRule",
      "selector": "b, strong"
    },
    {
      "class": "ImageRule",
      "selector": "img",
      "properties": {
        "image.url": {
          "attribute": "src",
          "selector": "img",
          "type": "string"
        },
        "image.caption": {
          "attribute": "src",
          "selector": "img",
          "type": "element"
        }
      }
    }
  ]
}
@pestevez pestevez added localization Issues related to the handling of multiple languages bug labels Feb 12, 2021
@pestevez
Copy link
Contributor

Hi @bbaronSVK - apologies for the delayed response. I see, I believe it is possible to create a localized version of the date, but I am treating it as a bug.

My recommendation would be to add an attribute to the field with the ISO date, and/or to add some of the standard meta tags for creation and modification time. This is in line with the way that we'll likely treat dates in the future. (See this comment for more details)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug localization Issues related to the handling of multiple languages
Projects
None yet
Development

No branches or pull requests

2 participants