Enhancement #2113
Add language code to URLs
| Status: | CLOSED | Start date: | 08/26/2013 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | 08/26/2013 | |
| Assignee: | - | % Done: | 100%  | |
| Category: | nethserver-nethgui | |||
| Target version: | v1.5.0 | |||
| Resolution: | NEEDINFO: | No | 
Description
Currently the interface language is selected by the user on the Login form and saved into User's session data.
This design has some drawbacks:- Consistency: 
Same URL produce different page languages versions - Efficiency: 
To know what language to use, we need to lock the session storage and read it. 
Associated revisions
DateTime UI view: fix URL with prefix parts from the $view. Refs #2113
RequestInterface: new getFormat() and getLanguageCode() methods. Refs #2113
Login UI module: use "path" paramter and Language UI module for redirects. Refs #2113
RequestInterface: Fixed @deprecated annotations. Refs #2113
Dashboard, PackageManager UI view: Absolute URLs in ajaxMessage() JS calls don't work anymore. Fix URL with prefix parts from the $view. Refs #2113
index.php: load default "system" modules. Refs #2113
index_dev.php: load default "system" modules. Refs #2113
PackageManager UI (Tracker submodule): added language to URL path. Refs #2113
Framework.php (createRequestModApache): check if HTTP_ACCEPT_LANGUAGE is set before use it. UA may not send the header. Refs #2113
password-expired template: added language prefix to UserProfile UI module link. Refs #2113
language: add missing labels to UserProfile module. Refs #2113
LogViewer UI module (Read): fixed request parameter handling after hasArgument() deprecation. Refs #2113
DateTime UI module: fixed @deprecated calls. Refs #2113
History
#1
    
    Updated by Davide Principi almost 8 years ago
    - Project changed from NethServer 6 to Nethgui
 - Status changed from TRIAGED to ON_DEV
 - % Done changed from 20 to 30
 - Estimated time set to 4.00
 
#2
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from ON_DEV to MODIFIED
 - % Done changed from 30 to 60
 
Changes to RequestInterface in nethserver-nethgui
Added methodsgetLanguageCode()getFormat(), renamed fromgetExtension()
getArgumentNames()getArgument()hasArgument()
Test case
- URLs path in server-manager must be prefixed by the lanuage code 
(it|en). If the prefix is missing a404 Language not founderror is returned - The 
server-manager/alias for httpd must work - Dashboard and the other UI modules must work as usual
 
#3
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from MODIFIED to ON_QA
 - Assignee deleted (
Davide Principi) - % Done changed from 60 to 70
 
In nethserver-testing:
nethserver-nethgui-1.2.3-11.0git06fa2052.ns6.noarch.rpm
nethserver-httpd-admin-1.0.5-2.0git1ca852bd.ns6.noarch.rpm
nethserver-base-1.4.1-1.0git9dd97aa7.ns6.noarch.rpm
#4
    
    Updated by Giacomo Sanchietti almost 8 years ago
    - Assignee set to Giacomo Sanchietti
 
#5
    
    Updated by Giacomo Sanchietti almost 8 years ago
    - Status changed from ON_QA to TRIAGED
 - Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 20
 
- nethserver-base-1.4.1-3.0git2d71a626.ns6.noarch
 - nethserver-nethgui-1.2.3-11.0git06fa2052.ns6.noarch
 - nethserver-httpd-admin-1.0.5-2.0git1ca852bd.ns6.noarch
 
- URLs with prefixed by language code work
 - Dashboard works correctly even in AJAX calls
 
- The 
server-manager/alias is not working (with or without prefixed language code), a 404 error is returned (Language not found) 
#6
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from TRIAGED to ON_DEV
 - Assignee set to Davide Principi
 - % Done changed from 20 to 30
 
#7
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from ON_DEV to MODIFIED
 - % Done changed from 30 to 60
 
Fixed a minor issue on 5b9e917
QA NOTE
It works for me: the redirect is set only for httpd instance
#8
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from MODIFIED to ON_QA
 - Assignee deleted (
Davide Principi) - % Done changed from 60 to 70
 
In nethserver-testing:
nethserver-nethgui-1.2.3-12.0git5b9e9170.ns6.noarch.rpm
Also consider change: commit:nethserver-directory|279e3ed
#9
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from ON_QA to TRIAGED
 - % Done changed from 70 to 20
 
This enhancement causes a problem in nethserver-base LogViewer module: log offset parameter o is ignored. Fix it before unlock this issue.
#10
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from TRIAGED to ON_DEV
 - Assignee set to Davide Principi
 - % Done changed from 20 to 30
 
#11
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from ON_DEV to MODIFIED
 - Assignee deleted (
Davide Principi) - % Done changed from 30 to 60
 
Fixed LogViewer UI module in nethserver-base package.
#12
    
    Updated by Davide Principi almost 8 years ago
    - Status changed from MODIFIED to ON_QA
 - % Done changed from 60 to 70
 
To be released with
#13
    
    Updated by Giacomo Sanchietti almost 8 years ago
    - Assignee set to Giacomo Sanchietti
 
#14
    
    Updated by Giacomo Sanchietti almost 8 years ago
    - Status changed from ON_QA to VERIFIED
 - Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 90
 
Mariking as VERIFIED.
Tested features:- URLs prefixed by language code: OK
 - Dashboard: OK
 - Alias server-manager: OK
 - Log viewer: OK
 
#15
    
    Updated by Davide Principi almost 8 years ago
    In nethserver-testing
nethserver-ntp-1.0.4-3.0git89404714.ns6.noarch.rpm
Contains UI fix for language code in URL
#16
    
    Updated by Giacomo Sanchietti almost 8 years ago
    - Status changed from VERIFIED to CLOSED
 - % Done changed from 90 to 100
 
- nethserver-nethgui-1.2.4-1.ns6.noarch.rpm
 - nethserver-ntp-1.0.5-1.ns6.noarch.rpm
 - nethserver-httpd-admin-1.0.6-1.ns6.noarch.rpm
 
#17
    
    Updated by Davide Principi over 7 years ago
    - Target version deleted (
v6.4-beta2)