Commit Graph

47 Commits

Author SHA1 Message Date
Robin Ward
ce3fe2f4c4 REFACTOR: Support bundling our admin section as an ember addon 2020-09-22 15:14:29 -04:00
Robin Ward
7df57b35da REFACTOR: Remove Discourse.__widget_helpers
It's now a variable in the context where the templates are created.
2020-08-06 14:35:46 -04:00
David Taylor
8c03868808
DEV: Correctly render data- attributes in widget hbs templates (#10376)
In virtualdom, element 'properties' are not completely synonymous with element 'attributes'. In particular, `data-` properties will not be rendered as attributes. To ensure all attributes are passed through, we need to include them under an `attributes` key. For more info, see https://github.com/Matt-Esch/virtual-dom/blob/master/docs/vnode.md#custom-attributes-data-
2020-08-06 14:33:09 +01:00
Joffrey JAFFEUX
23d585f255
REFACTOR: removes unreachable statement (#9680) 2020-05-07 16:37:02 +02:00
Robin Ward
b2b7afd310 Rename the server side widget hbs compiler 2020-03-27 12:06:14 -04:00
Robin Ward
eaa324ecbd Revert "Move the widget-hbs compiler to js from es6"
This reverts commit 5d66a2c16e.
2020-03-25 16:13:26 -04:00
Robin Ward
5d66a2c16e Move the widget-hbs compiler to js from es6 2020-03-25 15:03:21 -04:00
Gerhard Schlager
a5e80079d6 FEATURE: Add Belarusian language 2019-07-04 11:37:37 +02:00
Bianca Nenciu
4f97f85178 DEV: Fix lint. (#7824) 2019-06-28 20:24:09 +02:00
Robin Ward
3cb0d27d38 DEV: Upgrade our widget handlebars compiler
Now supports subexpressions such as i18n and concat, plus automatic
attaching of widgets similar to ember.
2019-05-02 15:47:57 -04:00
Robin Ward
dd29af4475 REFACTOR: {{avatar}} and {{date}} helpers in vdom templates
This is a step towards a nicer flag display under posts.
2019-04-30 15:22:38 -04:00
Gerhard Schlager
d43f4206c7 FEATURE: Add Armenian language 2019-03-28 14:24:14 +01:00
Penar Musaraj
5cef5b34ef DEV: Yarn-manage moment and moment-timezone libraries 2019-02-12 13:57:52 -05:00
Bianca Nenciu
5407036ef9 DEV: Run prettier. (#6420) 2018-09-21 11:02:23 +00:00
Joffrey JAFFEUX
0732c69f73
updates moment.js 2.22.1 and vendor moment-timezone 0.5.14 2018-04-26 09:15:53 +02:00
Mohammad AlTawil
234aa68bf8 Correct Arabic month names
Correct Arabic month names. It's not right to concatenate month names from two different calendars [Assyrian calendar](https://en.wikipedia.org/wiki/Assyrian_calendar) and [Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar)
2018-01-14 20:01:45 +01:00
blokovi
364e6fdd53 FIX: pluralization rules for Serbian language (#5453)
Updated SR pluralization to use 3 keys: one, few, other (as by Transifex)
2017-12-22 12:20:19 +01:00
Robin Ward
0c84352386 Add support for transformations 2017-10-05 16:24:58 -04:00
Robin Ward
07d04aba1d Support {{unless}} in virtual dom templates 2017-10-05 14:35:07 -04:00
Robin Ward
051b49efdb FIX: Properly encode string literals in hbs compiler 2017-10-04 15:53:06 -04:00
Robin Ward
0caf6a0f7d Support for HTML values in widget hbs templates 2017-09-29 09:56:14 -04:00
Robin Ward
df81d109e5 The ability to attach attrs when embedding widgets 2017-09-28 16:08:43 -04:00
Robin Ward
e980322ed6 Allow hbs widgets to access their parent state 2017-09-28 15:19:44 -04:00
Robin Ward
8c2d6118ff Remove some of the last few fa-icon helpers 2017-09-14 11:20:36 -04:00
Robin Ward
cb56dcdf2e FIX: Use proper iconNode when compiling virtual dom templates 2017-09-01 11:20:33 -04:00
Robin Ward
dffb1fc4ee FEATURE: Use Glimmer compiler for widget templates
Widgets can now specify a template which is precompiled using Glimmer's
AST and then converted into our virtual dom code.

Example:

```javascript
createWidget('post-link-arrow', {
  template: hbs`
    {{#if attrs.above}}
      <a class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
        {{fa-icon "arrow-up"}}
      </a>
    {{else}}
      <a class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
        {{fa-icon "arrow-down"}}
      </a>
    {{/if}}
  `,

  click() {
    DiscourseURL.routeTo(this.attrs.shareUrl);
  }
});
```
2017-09-01 09:28:16 -04:00
Guo Xiang Tan
0f2e2ea175 Update moment locales as well. 2017-04-20 12:24:20 +08:00
Guo Xiang Tan
8052218f61 Upgrade momentjs. 2017-04-19 22:04:35 +08:00
Neil Lalonde
477b237e45 FIX: use 'other' instead of 'many' for Ukrainian pluralization until translations are fixed 2016-12-30 11:49:25 -05:00
Sawood Alam
3f765e0227
Added Urdu locale file for moment.js 2016-12-06 13:55:38 -05:00
Régis Hanol
4eeae880b6 fix deprecation comment in momentjs 2016-05-21 12:49:29 +02:00
Régis Hanol
d43231da92 FIX: force date-picker to work with english locale 2016-05-18 20:58:33 +02:00
Robin Ward
cc25716e47 FIX: Allow message format translations to be overridden 2016-04-08 14:49:50 -04:00
Neil Lalonde
44e41df76b FIX: add missing MessageFormat files for fa_IR, pl_PL and tr_TR 2016-03-30 14:02:42 -04:00
Gerhard Schlager
8ced8350ba Upgrade moment.js to version 2.11.2
In order to make future upgrades easier we don't rename the locale files anymore.
2016-02-05 21:42:48 +01:00
Anton Andriyevskyy
c42a5551a1 Update RU pluralization to use 3 keys: one, few, other (as by Transifex) 2014-08-23 15:28:14 +03:00
Robin Ward
55c01d3320 Upgrade moment.js to latest version, add missing locales now that we
support more languages.
2014-08-20 14:41:50 -04:00
Neil Lalonde
cb11967715 Add transifex config. Reconcile client.yml and server.yml translations in github and transifex. Transifex is now the source of all client.yml and server.yml files. 2014-04-10 15:42:38 -04:00
Régis Hanol
c6bc324259 CLEANUP: remove unused pseudo locale 2014-02-26 19:03:04 +01:00
Sam
e922f10f4e correct locale helper so it falls back to english message format if mf is missing 2013-07-25 11:16:07 +10:00
Sam
d0f50cb266 fixing up moment locales, they were not set up properly 2013-07-25 11:09:29 +10:00
premprakash
8c5e0e7550 Adding Portuguese-Brazil language 2013-07-15 14:45:16 -03:00
Sam
c2cfbce9ce automatically updating times for posts on topic
moved moment.js into localization file (we need to localize it)
added helpers for date formatting use, moment().shortDate() moment().longDate() moment().shortDateNoYear()
2013-06-11 17:25:50 +10:00
Sam
5fa20ce357 more progress towards full migration to moment.js 2013-06-07 18:27:42 +10:00
Sam
c2e597c57c missing message format files 2013-05-30 17:03:47 +10:00
Sam
c26d70e68a make precompile happier 2013-05-30 16:58:31 +10:00
Sam
8874c9ea75 Add message format support that can be used on complex localization strings
Add message about new and unread topics at the bottom of topics
move localization helper into lib
2013-05-30 16:49:57 +10:00