mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1053 Fixed problems highlighted in pull request comments.
This commit is contained in:
@@ -62,7 +62,7 @@ public class LanguageRESTService {
|
||||
/**
|
||||
* The path to the translation folder within the webapp.
|
||||
*/
|
||||
private static final String TRANSLATION_PATHS = "/translations";
|
||||
private static final String TRANSLATION_PATH = "/translations";
|
||||
|
||||
/**
|
||||
* The JSON property for the human readable display name.
|
||||
@@ -92,8 +92,8 @@ public class LanguageRESTService {
|
||||
* The ServletContext associated with the request.
|
||||
*
|
||||
* @return
|
||||
* A list of languages defined in the system, consisting of
|
||||
* language display name and key.
|
||||
* A map of languages defined in the system, of language key to
|
||||
* display name.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If an error occurs while retrieving the available languages.
|
||||
@@ -104,7 +104,7 @@ public class LanguageRESTService {
|
||||
@Context ServletContext servletContext) throws GuacamoleException {
|
||||
|
||||
// Get the paths of all the translation files
|
||||
Set<String> resourcePaths = servletContext.getResourcePaths(TRANSLATION_PATHS);
|
||||
Set<String> resourcePaths = servletContext.getResourcePaths(TRANSLATION_PATH);
|
||||
|
||||
// If no translation files found, return an empty map
|
||||
if (resourcePaths == null)
|
||||
@@ -113,7 +113,7 @@ public class LanguageRESTService {
|
||||
Map<String, String> languageMap = new HashMap<String, String>();
|
||||
|
||||
// Iterate through all the found language files and add them to the return map
|
||||
for(String resourcePath : resourcePaths) {
|
||||
for (String resourcePath : resourcePaths) {
|
||||
|
||||
// Get input stream for language file
|
||||
InputStream languageFileStream = servletContext.getResourceAsStream(resourcePath);
|
||||
|
@@ -49,7 +49,7 @@ angular.module('rest').factory('languageService', ['$injector',
|
||||
token : authenticationService.getCurrentToken()
|
||||
};
|
||||
|
||||
// Retrieve available protocols
|
||||
// Retrieve available languages
|
||||
return $http({
|
||||
cache : cacheService.languages,
|
||||
method : 'GET',
|
||||
|
@@ -200,6 +200,4 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe
|
||||
}]
|
||||
};
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
|
@@ -20,7 +20,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
.preferences .update-password .form {
|
||||
.preferences .update-password .form,
|
||||
.preferences .language .form {
|
||||
padding-left: 0.5em;
|
||||
border-left: 3px solid rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
}
|
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
|
||||
<!-- Language settings -->
|
||||
<div class="settings section language update-password">
|
||||
<div class="settings section language">
|
||||
<p>{{'SETTINGS_PREFERENCES.HELP_LANGUAGE' | translate}}</p>
|
||||
|
||||
<!-- Language selection -->
|
||||
|
Reference in New Issue
Block a user