Commit graph

6 commits

Author SHA1 Message Date
Petr Pchelko
7f643f2ab6 UserNameUtils: use ITextFormatter instead of MessageLocalizer
Bug: T249045
Change-Id: Ica1e1e4788d4b9f9dfcf9f8c8b4136147d92b32e
2020-04-13 09:28:02 -07:00
Brad Jorsch
3f9f2f1ca8 MediaWiki\Message: Extract Message↔MessageValue conversion from TextFormatter
The Action API is going to need to convert between the two at various
boundaries where it receives a Status from business logic.

Also when we make HtmlFormatter and the like, that'll initially need the
same conversion logic too.

Change-Id: Id5b216b033718f3ef38bfd4be1715218ee07bb93
2019-11-26 08:58:05 +00:00
Umherirrender
337ecb0514 Add missing @param and @return to documentation
Change-Id: Ibc5849cc8ea7e7c4eb30ded9c1cfa5f52187c377
2019-11-10 22:12:58 +00:00
Max Semenik
1a3a67d296 TextFormatter: Remove a pointless type check
The function signature guarantees that this parameter can't be
of any other type.

Change-Id: I08f80e3ae7515f21f88b7f1f4f395ddbbb7b70ab
2019-10-07 15:20:57 +00:00
Brad Jorsch
c875265eff lib/Message: Support MessageValue as a parameter
Fixes an overstrict test in ListParam, and has TextFormatter convert
to Message recursively where necessary.

Change-Id: I387754b6857fbdeedea6afd222a2fdba1ebe1a9c
2019-08-30 15:14:37 -04:00
Tim Starling
09cd8eb080 MessageFormatterFactory
An injectable service interface for message formatting, somewhat
narrowed compared to Message.

Only the text format is implemented in this framework so far, with
getTextFormatter() returning a formatter that converts to the text
format. Other formatters could be added to MessageFormatterFactory.

Bug: T226598
Change-Id: Id053074c1dbcb692e8309fdca602f94a385bca0c
2019-08-28 12:28:05 +10:00