Alexander Wels has posted comments on this change.
Change subject: core: i18n welcome page with branding
......................................................................
Patch Set 6: (3 inline comments)
I will address the comments in the files.
Regarding the overriding option. If that is something that we get demand for it
should be very easy to add at some later point in time. For now what this does
is sufficient for our needs.
....................................................
File backend/manager/modules/root/src/main/webapp/WEB-INF/ovirt-engine.jsp
Line 33: <div class="welcome"><fmt:message key="welcome.text" /></div>
Line 34: <div class="welcome">
Line 35: <script type="text/JavaScript">
Line 36: <!--
Line 37: document.write('<fmt:message key="version"><fmt:param
value="myVersion" /> </fmt:message>')
The version message can have a {0} in it, which then gets replaced by the
string 'myVersion'. Now that I think about it a little more myVersion should be
pulled from the database or something.
Line 38: //-->
Line 39: </script>
Line 40: </div>
Line 41:
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/branding/BrandingManager.java
Line 247: while (keyMatcher.find()) {
Line 248: String key = keyMatcher.group(1);
Line 249: replacedTemplate = replacedTemplate.replaceAll("\\{"
+ key + "\\}", messageMap.get(key));
Line 250: }
Line 251: replacedTemplate = replacedTemplate.replaceAll("\\{0\\}",
locale.toString());
The actual properties file mentions this, but you are right I can definitely
replace {0} with something more sensible like {userLocale}
Line 252: templateBuilder.append(replacedTemplate);
Line 253: }
Line 254: return templateBuilder.toString();
Line 255: }
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/branding/BrandingTheme.java
Line 252: * If a line starts with '#' it is considered a comment and will
not end up in the output.
Line 253: * @param fileName The name of the file to read.
Line 254: * @return The contents of the file as a string.
Line 255: */
Line 256: private String readWelcomeTemplateFile(final String fileName) {
Good point, I forgot about commons.io
Line 257: StringBuilder templateBuilder = new StringBuilder();
Line 258: BufferedReader bufferedReader = null;
Line 259:
Line 260: try {
--
To view, visit http://gerrit.ovirt.org/16359
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9987ed58c2e0ead9b25c5f46fb974a96bfd46d30
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches