Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make UI Language switchable at runtime. #11

Open
2 tasks
NathanGibbs3 opened this issue Mar 13, 2019 · 0 comments
Open
2 tasks

Make UI Language switchable at runtime. #11

NathanGibbs3 opened this issue Mar 13, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. UI User Interface Issues.
Milestone

Comments

@NathanGibbs3
Copy link
Owner

NathanGibbs3 commented Mar 13, 2019

Item Description
File: Translation files under languages
Class: N/A
Function: N/A
Similar Issues: https://sourceforge.net/p/secureideas/feature-requests/26/
Depends on Issue(s): #139
Dependency Type: Soft
Misc. Info.:

Expected Behavior:
Can switch at runtime.
This could be part of a user's preferences if auth system is enabled.
Current Behavior:
Language is hard coded into app configuration at setup.


First we need to switch the constants based multi language support into something variable based.

The advantages:

  • The ability to switch UI language at run time.
  • Unit Tests that validate the completeness of all translations.

Sub Tasks

@NathanGibbs3 NathanGibbs3 added enhancement New feature or request LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. labels Mar 13, 2019
NathanGibbs3 added a commit that referenced this issue Mar 22, 2019
    File(s): includes/base_lang.inc.php
      Class: UILang
Function(s): Class Constructors.
             Class/Method agnostic PHP 5+ constructor shim.
             PHP4x Class constructor.
    File(s): includes/base_include.inc.php
             Added include for UI Language abstraction layer.
NathanGibbs3 added a commit that referenced this issue Mar 22, 2019
    File(s): includes/base_lang.inc.php
      Class: UILang
Function(s): SetUILocale()
             Sets locale from translation data or defaults to system locale.
NathanGibbs3 added a commit that referenced this issue Mar 28, 2019
Using the UILang class in code, as we work out bugs, test it, & build it.
This is currently alpha code. UILang at present does not support the
entire translation data set for each langauage.

This commit changes:
     Language files: Support UILang's capabilities, not much at
                     present. 😄
               Code: Support both UILang & Legacy translation data.
NathanGibbs3 added a commit that referenced this issue Mar 28, 2019
NathanGibbs3 added a commit that referenced this issue Mar 28, 2019
NathanGibbs3 added a commit that referenced this issue Mar 28, 2019
NathanGibbs3 added a commit that referenced this issue Mar 29, 2019
NathanGibbs3 added a commit that referenced this issue Mar 29, 2019
NathanGibbs3 added a commit that referenced this issue Mar 30, 2019
       File(s): includes/base_lang.inc.php
         Class: UILang
   Function(s): SetUITimeFmt()
                Sets Time format from translation data.
Language files: Support aditional UILang capability. 😄
          Code: Support UILang & Legacy translation data formats.
NathanGibbs3 added a commit that referenced this issue Mar 31, 2019
NathanGibbs3 added a commit that referenced this issue Apr 1, 2019
NathanGibbs3 added a commit that referenced this issue Apr 3, 2019
       File(s): includes/base_lang.inc.php
                Added missing comment.
       File(s): includes/base_output_html.inc.php
   Function(s): PrintPageStart()
                Code to standardize HTML Page initialization.
                Everything from the initial <!DOCTYPE> to the opening
                <body> tag.
                PrintBASESubHeader()
                Simplified via PrintPageStart()
                PrintFreshPage()
                Folded into PrintPageStart()
       File(s): base_hdr1.php
                Improved quality of generated HTML.
                Support change to language files.
       File(s): base_main.php
                Simplified via PrintPageStart() & including base_hdr1.php.
       File(s): index.php
                Simplified via PrintPageStart() & including base_hdr1.php.
                Removed javascript from login form.
                Replaced functionality with XHTML tag attribute
                autofocus="autofocus"
Language files: Reomved static text & the use of var $BASE_installID from
                Translation data.
NathanGibbs3 added a commit that referenced this issue Apr 3, 2019
       File(s): includes/base_lang.inc.php
         Class: UILang
   Function(s): SetUICharset()
                Sets HTML Content-Type charset from translation data.
                SetUITitle()
                Sets HTML Common Page Title from translation data.
Language files: Support aditional UILang capabilities. 😄
          Code: Support UILang & Legacy translation data formats.
       General: Fixed a comment typo in multiple files.
NathanGibbs3 added a commit that referenced this issue Apr 4, 2019
NathanGibbs3 added a commit that referenced this issue Apr 5, 2019
    File(s): includes/base_output_html.inc.php
Function(s): PrintPageStart()
             Renamed to PageStart()
             PageEnd()
             Code to standardize HTML Page ending.
             Currently the closing </body> & </html> tags.
             PrintBASESubHeader()
             Fixed call to PrintPageStart()
    File(s): base_main.php
             Fixed call to PrintPageStart()
             Called PageEnd()
             Minor code cleanup.
    File(s): index.php
             Fixed call to PrintPageStart()
             Called PageEnd()
NathanGibbs3 added a commit that referenced this issue Apr 6, 2019
                   Misc. Output & Security fixes.

       File(s): includes/base_lang.inc.php
         Class: UILang
   Function(s): SetUIADItem()
                Sets Authentication Data Item from translation data.
                Only supports a subset of the authentication data at
                the moment.
Language files: Support aditional UILang capabilities. 😄
          Code: Support UILang & Legacy translation data formats.
       File(s): includes/base_output_html.inc.php
              : base_hdr1.php
              : base_footer.php
                Removed unnecessary information disclosure to
                unauthenticated users.
       File(s): admin/base_roleadmin.php
              : admin/base_useradmin.php
                Limited functionality when auth system is disabled.
       General: Minor output fixes in multiple files.
NathanGibbs3 added a commit that referenced this issue Apr 11, 2019
    File(s): includes/base_lang.inc.php
      Class: UILang
Function(s): SetUILocale()
             Fix bug where Locale wasn't being set for New format TD files.
NathanGibbs3 added a commit that referenced this issue Apr 11, 2019
File(s): base_main.php
         Fix logic bug that prevented display of Query & DB info when
         UIlocale was successfully set.
         Unearthed by commit: 193f862.
@NathanGibbs3 NathanGibbs3 self-assigned this Apr 11, 2019
NathanGibbs3 added a commit that referenced this issue Apr 12, 2019
                   Misc. Output fixes.

       File(s): includes/base_lang.inc.php
         Class: UILang
   Function(s): SetUICPItem()
                Sets Common Phrase Item from translation data.
                Only supports a subset of the common phrase data at
                the moment.
Language files: Support aditional UILang capabilities. 😄
          Code: Support UILang & Legacy translation data formats.
       General: Minor output fixes in multiple files.
NathanGibbs3 added a commit that referenced this issue Apr 13, 2019
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CPA
   Language files: Support aditional UILang capabilities. 😄
             Code: Support UILang & Legacy translation data formats.
          General: Minor output fixes in multiple files.
NathanGibbs3 added a commit that referenced this issue Apr 13, 2019
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CPA
   Language files: Support aditional UILang capabilities. 😄
             Code: Support UILang & Legacy translation data formats.
          General: Minor output fixes in multiple files.
NathanGibbs3 added a commit that referenced this issue Apr 13, 2019
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CPA
   Language files: Support additional UILang capabilities. 😄
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
NathanGibbs3 added a commit that referenced this issue Apr 17, 2019
          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CPA
                   Fixed use of incorrect TD Var in class initialization.
                   Bug introduced in:
                   Commit: 723566d
   Language files: Support additional UILang capabilities. 😄
             Code: Support UILang & Legacy TD formats.
NathanGibbs3 added a commit that referenced this issue Jun 6, 2019
NathanGibbs3 added a commit that referenced this issue Jun 6, 2019
NathanGibbs3 added a commit that referenced this issue Jun 6, 2019
NathanGibbs3 added a commit that referenced this issue Jun 6, 2019
NathanGibbs3 added a commit that referenced this issue Jun 6, 2019
NathanGibbs3 added a commit that referenced this issue Jun 6, 2019
         Reverted the Issue #34 related trainwreck on this branch.
         Back to commit: a688054
         Keep the Issue #35 corrections.
         Will fix the underlying Issue #34 problem from the
         devel branch and then remerge.
NathanGibbs3 added a commit that referenced this issue Jun 27, 2019
                   Closes #30
                   Partial fixes for Issue #1 TD for czech,
                   swedish, & turkish.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
      Function(s): Phrase()
                   Add flag to use &nbsp; spacing alternative when
                   needed.
Data Structure(s): UILang->CPA
                   UILang->CWA
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character E1 with
                   multibyte C3A1.
                   Migrate 1 to 1 word translation Items from
                   UILang->CPA to UILang->CWA. Closes #30
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
NathanGibbs3 added a commit that referenced this issue Jun 28, 2019
                   Complete fix for Issue #1 TD for finnish.
                   Partial fixes for Issue #1 TD for czech,
                   swedish, & turkish.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CPA
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character E4 with
                   multibyte C3A4.
                   Replaced invalid UTF-8 character FD with
                   multibyte C3BD.
                   Replaced invalid UTF-8 character FE with
                   multibyte C3BE.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
NathanGibbs3 added a commit that referenced this issue Jun 29, 2019
                   Partial fixes for Issue #1 TD for czech,
                   french & turkish.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CPA
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character E9 with
                   multibyte C3A9.
                   Replaced invalid UTF-8 character FC with
                   multibyte C3BC.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
NathanGibbs3 added a commit that referenced this issue Jul 1, 2019
                   Partial fix of Issue #1 TD for french,
                   italian, & turkish.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
                   Laid out some index elements for furture TD Items.
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character E0 with
                   multibyte C3A0.
                   Replaced invalid UTF-8 character D6 with
                   multibyte C396.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
NathanGibbs3 added a commit that referenced this issue Jul 1, 2019
                   Converted russian TD file from windows-1251
                   charset to UTF-8 charset via enca.
                   enconv -L ru -x UTF-8 russian.lang.php
NathanGibbs3 added a commit that referenced this issue Jul 2, 2019
                   Partial fix of Issue #1 TD for danish,
                   & norwegian.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character E6 with
                   multibyte C3A6.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
        Update(s): TD Migration Matrix.
                   Unit Tests.
NathanGibbs3 added a commit that referenced this issue Jul 3, 2019
                   _MARCG, _APRIL, _MAY, _JUNE, _JULY, _AUGUST,
                   _SEPTEMBER, _OCTOBER, _NOVEMBER, _DECEMBER.
                   Partial fix of Issue #1 TD for czech, french,
                   & italian.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
                   UILang->ILocale
                   Auto Generated Locale.
     Functions(s): Class Init
                   Auto Generate Long/Short Month Names via Intl with
                   fall back to installed Locale(s), then to TD file
                   in either UILang or legacy format. 😄
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character C8 with
                   multibyte C388.
                   Replaced invalid UTF-8 character DA with
                   multibyte C39A.
                   Replaced invalid UTF-8 character E8 with
                   multibyte C3A8.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
        Update(s): TD Migration Matrix.
                   Unit Tests.
NathanGibbs3 added a commit that referenced this issue Jul 4, 2019
                   Partial fix of Issue #1 TD for czech,
                   danish, & norwegian.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character D8 with
                   multibyte C398.
                   Replaced invalid UTF-8 character EC with
                   multibyte C3AC.
                   Replaced invalid UTF-8 character F8 with
                   multibyte C3B8.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
        Update(s): TD Migration Matrix.
                   Unit Tests.
NathanGibbs3 added a commit that referenced this issue Jul 13, 2019
NathanGibbs3 added a commit that referenced this issue Jul 13, 2019
NathanGibbs3 added a commit that referenced this issue Jul 13, 2019
NathanGibbs3 added a commit that referenced this issue Jul 15, 2019
                   Complete fix of Issue #1 TD for norwegian.
                   Partial fix of Issue #1 TD for czech,
                   danish, french, italian, swedish, & turkish.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
   Language files: Support additional UILang capabilities. 😄
                   Replaced invalid UTF-8 character DD with
                   multibyte C39D.
                   Replaced invalid UTF-8 character E5 with
                   multibyte C3A5.
                   Replaced invalid UTF-8 character F9 with
                   multibyte C3B9.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
        Update(s): TD Migration Matrix.
                   Unit Tests.
NathanGibbs3 added a commit that referenced this issue Jul 15, 2019
NathanGibbs3 added a commit that referenced this issue Jul 19, 2019
                   Partial fix of Issue(s) #1 & #56 for czech TD.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
   Language files: Support additional UILang capabilities. 😄
                   Issue #1 Czech
                   Replaced invalid UTF-8 character AE with
                   multibyte C5BD.
                   Replaced invalid UTF-8 character B9 with
                   multibyte C5A1.
                   Replaced invalid UTF-8 character BE with
                   multibyte C5BE.
                   Issue #56 Czech
                   Replace incorrectly converted ISO-8859-2 character
                   C8 to UTF-8 C388 with C48C.
                   Replace incorrectly converted ISO-8859-2 character
                   D8 to UTF-8 C398 with C598.
                   Replace incorrectly converted ISO-8859-2 character
                   F9 to UTF-8 C3B9 with C5AF.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
        Update(s): TD Migration Matrix.
                   Unit Tests.
NathanGibbs3 added a commit that referenced this issue Apr 26, 2020
                   Partial fix of Issue(s) #1 & #56 for Czech TD.
                   Partial fix of Issue #56 for Turkish TD.
                   Misc. Output fixes.

          File(s): includes/base_lang.inc.php
            Class: UILang
Data Structure(s): UILang->CWA
   Language files: Support additional UILang capabilities. 😄
                   Issue #1 Czech
                   Replaced invalid UTF-8 character EF with
                   multibyte C48F
                   Replaced invalid UTF-8 character F3 with
                   multibyte C3B3.
                   Replaced invalid UTF-8 character FA with
                   multibyte C3BA.
                   Issue #56 Czech
                   Replace incorrectly converted ISO-8859-2 character
                   E8 to UTF-8 with C48D.
                   Replace incorrectly converted ISO-8859-2 character
                   EC to UTF-8 with C49B.
                   Replace incorrectly converted ISO-8859-2 character
                   F8 to UTF-8 with C599.
                   Issue #56 Turkish
                   Replace incorrectly converted ISO-8859-2 character
                   FD to UTF-8 with C4B1.
             Code: Support UILang & Legacy TD formats.
                   Minor output fixes.
        Update(s): TD Migration Matrix.
                   Unit Tests.
NathanGibbs3 added a commit that referenced this issue May 1, 2020
                   Month Name bug in UILang Init.
                   Found via CI & Unit Testing. 😄
NathanGibbs3 added a commit that referenced this issue May 5, 2020
          File(s): includes/base_output_html.inc.php
      Function(s): PageStart()
                   Bug found via Unit Testing. 😄
                   Bug fixed.
     Unit Test(s): Some Tests specific to this branch failed.
                   Now passes with last merge from devel.
@NathanGibbs3 NathanGibbs3 added the UI User Interface Issues. label May 15, 2020
@NathanGibbs3 NathanGibbs3 added this to the 1.4.7 milestone Sep 11, 2020
@NathanGibbs3 NathanGibbs3 added the invalid This doesn't seem right label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. UI User Interface Issues.
Projects
Development

No branches or pull requests

1 participant