Enhancement #2113

Add language code to URLs

Added by Davide Principi about 6 years ago. Updated over 5 years ago.

Status:CLOSEDStart date:08/26/2013
Priority:NormalDue 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

Revision 29dd4348
Added by Davide Principi about 6 years ago

DateTime UI view: fix URL with prefix parts from the $view. Refs #2113

Revision e954f38a
Added by Davide Principi about 6 years ago

RequestInterface: new getFormat() and getLanguageCode() methods. Refs #2113

Revision 803c596d
Added by Davide Principi about 6 years ago

Login UI module: use "path" paramter and Language UI module for redirects. Refs #2113

Revision 3927378b
Added by Davide Principi about 6 years ago

RequestInterface: Fixed @deprecated annotations. Refs #2113

Revision 9dd97aa7
Added by Davide Principi about 6 years ago

Dashboard, PackageManager UI view: Absolute URLs in ajaxMessage() JS calls don't work anymore. Fix URL with prefix parts from the $view. Refs #2113

Revision 047c3718
Added by Davide Principi about 6 years ago

index.php: load default "system" modules. Refs #2113

Revision 1ca852bd
Added by Davide Principi about 6 years ago

index_dev.php: load default "system" modules. Refs #2113

Revision c389387f
Added by Davide Principi about 6 years ago

PackageManager UI (Tracker submodule): added language to URL path. Refs #2113

Revision 5b9e9170
Added by Davide Principi about 6 years ago

Framework.php (createRequestModApache): check if HTTP_ACCEPT_LANGUAGE is set before use it. UA may not send the header. Refs #2113

Revision 279e3ed4
Added by Davide Principi about 6 years ago

password-expired template: added language prefix to UserProfile UI module link. Refs #2113

Revision 152e4103
Added by Giacomo Sanchietti about 6 years ago

language: add missing labels to UserProfile module. Refs #2113

Revision a46501a2
Added by Davide Principi about 6 years ago

LogViewer UI module (Read): fixed request parameter handling after hasArgument() deprecation. Refs #2113

Revision 89404714
Added by Davide Principi almost 6 years ago

DateTime UI module: fixed @deprecated calls. Refs #2113

History

#1 Updated by Davide Principi about 6 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 about 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

Changes to RequestInterface in nethserver-nethgui

Added methods
  • getLanguageCode()
  • getFormat(), renamed from getExtension()
Deprecated methods
  • getArgumentNames()
  • getArgument()
  • hasArgument()
Changed packages:

Test case

  • URLs path in server-manager must be prefixed by the lanuage code (it|en). If the prefix is missing a 404 Language not found error 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 about 6 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 about 6 years ago

  • Assignee set to Giacomo Sanchietti

#5 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from ON_QA to TRIAGED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 20
Installed packages:
  • 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
Passed test cases
  • URLs with prefixed by language code work
  • Dashboard works correctly even in AJAX calls
NOT passed test cases
  • 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 about 6 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 about 6 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 about 6 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 about 6 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 about 6 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 about 6 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.

See nethserver:nethserver-base|a46501a

#12 Updated by Davide Principi about 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

#13 Updated by Giacomo Sanchietti about 6 years ago

  • Assignee set to Giacomo Sanchietti

#14 Updated by Giacomo Sanchietti about 6 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 6 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 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
In nethserver-updates:
  • 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 5 years ago

  • Target version deleted (v6.4-beta2)

Also available in: Atom PDF