dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36188
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18532: add Ui/Db locale user setting in AppCacheFilter
------------------------------------------------------------
revno: 18532
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-03-09 12:42:33 +0530
message:
add Ui/Db locale user setting in AppCacheFilter
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java 2015-02-27 05:35:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java 2015-03-09 07:12:33 +0000
@@ -28,6 +28,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.i18n.I18nService;
+import org.hisp.dhis.i18n.ui.locale.UserSettingLocaleManager;
import org.hisp.dhis.system.SystemInfo;
import org.hisp.dhis.system.SystemService;
import org.hisp.dhis.user.CurrentUserService;
@@ -57,6 +59,12 @@
@Autowired
private SystemService systemService;
+ @Autowired
+ private UserSettingLocaleManager localeManager;
+
+ @Autowired
+ private I18nService i18nService;
+
@Override
public void doFilter( ServletRequest req, ServletResponse res, FilterChain chain ) throws IOException, ServletException
{
@@ -76,6 +84,8 @@
writer.print( responseWrapper.toString() );
writer.println( "# DHIS2 " + systemInfo.getVersion() + " r" + systemInfo.getRevision() );
writer.println( "# User: " + currentUserService.getCurrentUsername() );
+ writer.println( "# User UI Language: " + localeManager.getCurrentLocale() );
+ writer.println( "# User DB Language: " + i18nService.getCurrentLocale() );
writer.println( "# Calendar: " + systemInfo.getCalendar() );
}
}