-
-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XWIKI-21452: Macros info, success, warning and error are only distinguished by colors #3023
Changes from 42 commits
e893a59
ce0d296
a2864ea
9cb73e8
8cd50de
9b0ef83
83571f1
31eb18a
ab5e55f
ce3be8c
7fa4083
e47c7f8
980a360
b9393db
131db3c
5840570
2df7497
521e428
504cd67
e3a0914
fd80d5b
6c0b9e2
c8944cc
255e082
0b7dc8a
6598952
448e564
9be5a4f
5a75166
f4a1f06
963e697
cf5cee1
3ba8e1d
03aba25
82b894d
90e15c5
a61c518
cc763ee
13c360b
287f092
1ff7bb4
b99cef0
ba7838d
9e77593
40015cd
67a10e1
43ae07e
4a8cecb
3dbf161
b62ecdd
3415d2e
03bc9cd
56f6565
d4e7cca
a9bf1fb
2df9eec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.xwiki.platform</groupId> | ||
<artifactId>xwiki-platform-rendering-macros</artifactId> | ||
<version>16.3.0-SNAPSHOT</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This version needs to be updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 9e77593 |
||
</parent> | ||
<artifactId>xwiki-platform-rendering-macro-message</artifactId> | ||
<name>XWiki Platform - Rendering - Macro - Message</name> | ||
<description>Extends the default message macro to provide translations.</description> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.xwiki.platform</groupId> | ||
<artifactId>xwiki-platform-localization-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.xwiki.rendering</groupId> | ||
<artifactId>xwiki-rendering-macro-message</artifactId> | ||
<version>${rendering.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.xwiki.rendering.internal.macro.message; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
import org.xwiki.component.annotation.Component; | ||
import org.xwiki.localization.ContextualLocalizationManager; | ||
|
||
/** | ||
* Displays an error message. | ||
* | ||
* @version $Id$ | ||
* @since 16.4.0RC1 | ||
*/ | ||
@Component | ||
@Named("error") | ||
@Singleton | ||
public class XWikiErrorMessageMacro extends ErrorMessageMacro | ||
{ | ||
private static String iconPrettyNameKey = "rendering.macro.message.icon.alternative.error"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in 9e77593 👍 |
||
@Inject | ||
private ContextualLocalizationManager l10n; | ||
|
||
/** | ||
* Create and initialize the descriptor of the macro. | ||
*/ | ||
public XWikiErrorMessageMacro() | ||
{ | ||
super(); | ||
this.iconPrettyName = l10n.getTranslation(iconPrettyNameKey).toString(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in 9e77593 👍 |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.xwiki.rendering.internal.macro.message; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
import org.xwiki.component.annotation.Component; | ||
import org.xwiki.localization.ContextualLocalizationManager; | ||
|
||
/** | ||
* Displays an info message. | ||
* | ||
* @version $Id$ | ||
* @since 16.4.0RC1 | ||
*/ | ||
@Component | ||
@Named("info") | ||
@Singleton | ||
public class XWikiInfoMessageMacro extends InfoMessageMacro | ||
{ | ||
private static String iconPrettyNameKey = "rendering.macro.message.icon.alternative.info"; | ||
@Inject | ||
private ContextualLocalizationManager l10n; | ||
|
||
/** | ||
* Create and initialize the descriptor of the macro. | ||
*/ | ||
public XWikiInfoMessageMacro() | ||
{ | ||
super(); | ||
this.iconPrettyName = l10n.getTranslation(iconPrettyNameKey).toString(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is unrelated to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in 9e77593 👍