[Bug 20504] New: Language attribute in html tag is empty in system preference editor

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] New: Language attribute in html tag is empty in system preference editor

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

            Bug ID: 20504
           Summary: Language attribute in html tag is empty in system
                    preference editor
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Staff Client
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email]

Koha populates the lanugage attribute of the html tag on all pages with the
language code of the currently selected language. Apart from other things this
allows customizations using the language code to control visibility of
translated text.

This works well, but for the system preference editor, where the language
attribute is empty:

<html lang="">

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christian.stelzenmueller@bs
                   |                            |z-bw.de

--- Comment #1 from Katrin Fischer <[hidden email]> ---
*** Bug 19591 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

--- Comment #2 from Katrin Fischer <[hidden email]> ---
The problem is that $lang is send to the template from preferences.pl and
overwrites the normal $lang variable.

I *think* the variable is not used/never properly set.

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff
   Patch complexity|---                         |Small patch

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

--- Comment #3 from Katrin Fischer <[hidden email]> ---
Created attachment 77634
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77634&action=edit
Bug 20504: Fix lang attribute in html tag on systempreferences page

On the system preferences page the lang attribute of the
html tag is always empty.

To test:
- Go to systempreferences
- Check the html source and look at the html tag,
  it should read: <html lang="">
- Apply patch
- Check the html source again: <html lang="en">
  Verify the language code shown matches the currently
  selected language in the staff interface
- Verify the language system preferences work correctly

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

--- Comment #4 from Katrin Fischer <[hidden email]> ---
I am not totally sure about this one - it seems that the $lang variable in the
preferences code was never set and not used in the template. But by overwriting
the existing lang template variable, it broke the lang attribute in the html
tag.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77634|0                           |1
        is obsolete|                            |

--- Comment #5 from Jonathan Druart <[hidden email]> ---
Created attachment 77636
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77636&action=edit
Bug 20504: Fix lang attribute in html tag on systempreferences page

On the system preferences page the lang attribute of the
html tag is always empty.

To test:
- Go to systempreferences
- Check the html source and look at the html tag,
  it should read: <html lang="">
- Apply patch
- Check the html source again: <html lang="en">
  Verify the language code shown matches the currently
  selected language in the staff interface
- Verify the language system preferences work correctly

Signed-off-by: Jonathan Druart <[hidden email]>
The problem was actually that
  $lang = $template->param( 'lang' );
should certainly be $lang = $input->param( 'lang' );
and, as it, it overrides the value of 'lang' passed from C4::Auth

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20504] Language attribute in html tag is empty in system preference editor

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20504

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/