Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    once more localizing folders

    Kopano Groupware Core
    5
    25
    1341
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • El Muchacho
      El Muchacho last edited by

      Hiho …
      … new user forgot to switch default lang in 1st start window to german.
      Now all foldernames are default english.

      Tried the python script from here but always get an error:

      root@kopano1:~# python localize-folders.py --user myuser --lang de_DE.UTF-8
      Localizing user: myuser
      Changing localized folder names to "de_DE.UTF-8"
      'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)```
      

      locale on my debian stretch shows

      LANG=de_DE.UTF-8
      LANGUAGE=
      LC_CTYPE="de_DE.UTF-8"
      LC_NUMERIC="de_DE.UTF-8"
      LC_TIME="de_DE.UTF-8"
      LC_COLLATE="de_DE.UTF-8"
      LC_MONETARY="de_DE.UTF-8"
      LC_MESSAGES="de_DE.UTF-8"
      LC_PAPER="de_DE.UTF-8"
      LC_NAME="de_DE.UTF-8"
      LC_ADDRESS="de_DE.UTF-8"
      LC_TELEPHONE="de_DE.UTF-8"
      LC_MEASUREMENT="de_DE.UTF-8"
      LC_IDENTIFICATION="de_DE.UTF-8"
      LC_ALL=
      

      and

      kopano-locales are OK, i think

      root@kopano1:/# cat /etc/default/kopano | grep LOCALE
      KOPANO_LOCALE="de_DE.UTF-8"
      KOPANO_USERSCRIPT_LOCALE="de_DE.UTF-8"
      

      what am I missing?

      regards

      Rico

      fbartels 1 Reply Last reply Reply Quote 0
      • thctlo
        thctlo last edited by

        You nothing.

        This looks like a python2/3 bug.

        try python3 localize-folders.py --user myuser --lang de_DE.UTF-8

        El Muchacho 1 Reply Last reply Reply Quote 0
        • fbartels
          fbartels Kopano @El Muchacho last edited by

          @El-Muchacho said in once more localizing folders:

          … new user forgot to switch default lang in 1st start window to german.
          Now all foldernames are default english.

          the “welcome screen” in WebApp does not have an influence on the folder names, as these are already created before the user logs in (when the user was created actually).

          @El-Muchacho said in once more localizing folders:

          what am I missing?

          Can you provide versions used? Are you using the latest version of the python script?

          Regards Felix

          Resources:
          https://kopano.com/blog/how-to-get-kopano/
          https://documentation.kopano.io/
          https://kb.kopano.io/

          Support overview:
          https://kopano.com/support/

          El Muchacho 1 Reply Last reply Reply Quote 0
          • El Muchacho
            El Muchacho @fbartels last edited by El Muchacho

            @fbartels said in once more localizing folders:

            Are you using the latest version of the python script?

            Think so … got it from here today

            @fbartels said in once more localizing folders:

            the “welcome screen” in WebApp does not have an influence on the folder names, as these are already created before the user logs in (when the user was created actually).

            OK … so I missed something while user-creation? Is there more than the KOPANO LOCALE settings needed in order to create the stores successfully in german?

            Yes ;) found it here
            created the admin.cfg in /etc/kopano and added default_store_locale = de_DE.UTF-8

            New users are now created successfully

            But the problem with some current users is still there.
            The script is not working for me.

            fbartels 1 Reply Last reply Reply Quote 0
            • El Muchacho
              El Muchacho @thctlo last edited by

              @thctlo said in once more localizing folders:

              This looks like a python2/3 bug.
              try python3 localize-folders.py --user myuser --lang de_DE.UTF-8

              by using it with python3 i get

              root@kopano1:~# python3 localize-folders.py --user myuser --lang de_DE.UTF-8
              Traceback (most recent call last):
                File "localize-folders.py", line 9, in <module>
                  import kopano
              ImportError: No module named 'kopano'
              
              1 Reply Last reply Reply Quote 0
              • fbartels
                fbartels Kopano @El Muchacho last edited by

                @El-Muchacho said in once more localizing folders:

                Is there more than the KOPANO LOCALE settings needed in order to create the stores successfully in german?

                yes this has changed in 8.6.8. see https://documentation.kopano.io/kopano_changelog/kc.html#kopano-core-8-6-8-8-6-8-0

                @El-Muchacho said in once more localizing folders:

                ImportError: No module named ‘kopano’

                you would then also need to have python3-kopano installed when calling the script.

                sadly you provide no information which kopano version you are using or in which os you are seeing this.

                Regards Felix

                Resources:
                https://kopano.com/blog/how-to-get-kopano/
                https://documentation.kopano.io/
                https://kb.kopano.io/

                Support overview:
                https://kopano.com/support/

                El Muchacho 1 Reply Last reply Reply Quote 0
                • El Muchacho
                  El Muchacho @fbartels last edited by El Muchacho

                  @fbartels said in once more localizing folders:

                  sadly you provide no information which kopano version you are using or in which os you are seeing this.

                  debian stretch … it’s in initial post ;)
                  and currently still using kopano 8.6.9

                  and btw : dry-run looks correct:

                  root@kopano1:~# python localize-folders.py --u myuser --lang de_DE.UTF-8 --dry-run
                  Localizing user: myuser
                  Changing localized folder names to "de_DE.UTF-8"
                  Running in dry mode no changes will be made
                  Renaming MAPI Folder "junk" -> From "Spam" To "Spam"
                  Renaming MAPI Folder "tasks" -> From "Aufgaben" To "Aufgaben"
                  Renaming MAPI Folder "journal" -> From "Journal" To "Journal"
                  Renaming MAPI Folder "wastebasket" -> From "Deleted Items" To "Gelöschte Objekte"
                  Renaming MAPI Folder "inbox" -> From "Inbox" To "Posteingang"
                  Renaming MAPI Folder "sentmail" -> From "Sent Items" To "Gesendete Objekte"
                  Renaming MAPI Folder "outbox" -> From "Outbox" To "Postausgang"
                  Renaming MAPI Folder "calendar" -> From "Calendar" To "Kalender"
                  Renaming MAPI Folder "rss" -> From "RSS Feeds" To "RSS-Feeds"
                  Renaming MAPI Folder "drafts" -> From "Drafts" To "Entwürfe"
                  Renaming MAPI Folder "contacts" -> From "Contacts" To "Kontakte"
                  Renaming MAPI Folder "notes" -> From "Notes" To "Notizen"
                  Renaming MAPI Folder "suggested_contacts" -> From "Suggested Contacts" To "Vorgeschlagene Kontakte"
                  
                  MKral 1 Reply Last reply Reply Quote 0
                  • MKral
                    MKral @El Muchacho last edited by

                    @El-Muchacho

                    in /etc/apache2/envvars change:
                    “export LANG=C”
                    to
                    “export LANG=de_DE.UTF-8”

                    … after that:
                    /etc/init.d/apache2 restart

                    1 Reply Last reply Reply Quote 0
                    • micro
                      micro last edited by micro

                      I am facing exactly the same issue as reported by El Muchacho by using the script provided here. I am trying to change a mailbox to german language de_DE. The last advice to change the apache2 envvar line and restarting apache2 did not help either. So what is the solution to this? The --dry-run succeeds, but the real run fails with the same error message.

                      Initially I changed it to english language with

                      python localize-folders.py -u mmustermann --lang en_GB
                      

                      and it worked like a charm. Then I tried to change it back to german with:

                      python localize-folders.py -u mmustermann --lang de_DE
                      

                      but it failed with error message

                      Error: de_DE Is not a language pack or is not installed

                      so I retried with

                      python localize-folders.py -u mmustermann --lang de_DE.UTF-8
                      

                      which leads to the initial mentioned error message

                      Localizing user: mmustermann
                      Changing localized folder names to “de_DE.UTF-8”
                      ‘ascii’ codec can’t decode byte 0xc3 in position 3: ordinal not in range(128)

                      the dry-run shows no errors though:

                      python localize-folders.py -u mmustermann --lang de_DE.UTF-8 --dry-run
                      

                      Localizing user: mmustermann
                      Changing localized folder names to “de_DE.UTF-8”
                      Running in dry mode no changes will be made
                      Renaming MAPI Folder “junk” -> From “Junk E-Mail” To “Junk E-Mail”
                      Renaming MAPI Folder “tasks” -> From “Aufgaben” To “Aufgaben”
                      Renaming MAPI Folder “journal” -> From “Journal” To “Journal”
                      Renaming MAPI Folder “wastebasket” -> From “Deleted Items” To “Gelöschte Objekte”
                      Renaming MAPI Folder “inbox” -> From “Inbox” To “Posteingang”
                      Renaming MAPI Folder “sentmail” -> From “Sent Items” To “Gesendete Objekte”
                      Renaming MAPI Folder “outbox” -> From “Outbox” To “Postausgang”
                      Renaming MAPI Folder “calendar” -> From “Calendar” To “Kalender”
                      Renaming MAPI Folder “rss” -> From “RSS Feeds” To “RSS Feeds”
                      Renaming MAPI Folder “drafts” -> From “Drafts” To “Entwürfe”
                      Renaming MAPI Folder “contacts” -> From “Contacts” To “Kontakte”
                      Renaming MAPI Folder “notes” -> From “Notes” To “Notizen”
                      Renaming MAPI Folder “suggested_contacts” -> From “Suggested Contacts” To >“Vorgeschlagene Kontakte”

                      1 Reply Last reply Reply Quote 0
                      • thctlo
                        thctlo last edited by

                        Try running : dpkg-reconfigure -plow locales

                        1 Reply Last reply Reply Quote 0
                        • micro
                          micro last edited by micro

                          man dpkg-reconfigure
                          

                          -pvalue, --priority=value
                          Specify the minimum priority of question that will be displayed. dpkg-reconfigure normally shows low priority questions no matter what your default priority is. See debconf(7) for a list.

                          can you provide more info and background about this command and how it might cure the issue? I don’t want to mess around with my locales on this production environment.

                          fbartels thctlo 2 Replies Last reply Reply Quote 0
                          • fbartels
                            fbartels Kopano @micro last edited by

                            @micro an error like ‘ascii’ codec can’t decode byte 0xc3 in position 3: ordinal not in range(128) usually means that your local terminal does not understand utf-8.

                            You can disregard the apache stuff, as this is not directly relevant for the python script.

                            Regards Felix

                            Resources:
                            https://kopano.com/blog/how-to-get-kopano/
                            https://documentation.kopano.io/
                            https://kb.kopano.io/

                            Support overview:
                            https://kopano.com/support/

                            1 Reply Last reply Reply Quote 0
                            • micro
                              micro last edited by

                              alright, but do you have any suggestion to this error which might lead to success ?

                              fbartels 1 Reply Last reply Reply Quote 0
                              • thctlo
                                thctlo @micro last edited by

                                @micro man locale-gen

                                This give you the option to (re-)generate the locales.

                                dpkg-reconfigure -plow locales
                                Shows all questions and allows you to select other locales to add and you can set a default with it.

                                1 Reply Last reply Reply Quote 0
                                • fbartels
                                  fbartels Kopano @micro last edited by

                                  @micro reconfigure your terminal (not your server) to work with utf-8.

                                  How to do that depends in your terminal emulator, but a quick search should give instructions.

                                  Regards Felix

                                  Resources:
                                  https://kopano.com/blog/how-to-get-kopano/
                                  https://documentation.kopano.io/
                                  https://kb.kopano.io/

                                  Support overview:
                                  https://kopano.com/support/

                                  1 Reply Last reply Reply Quote 0
                                  • micro
                                    micro last edited by micro

                                    well, I am pretty sure for 100% that I did run “dpkg-reconfigure locales” quite after I installed the OS. This is one of the basic steps I perform on a clean install.

                                    When I now run the mentioned command, I see that my settings
                                    de_DE.UTF-8
                                    en_US.UTF-8

                                    are highlighted with the asterisk [*]. On the next step I see that de_DE.UTF-8 is used for my default system environment and once I confirm all these settings the locales are generated. But as said before, I have done this step already and I already got those locales installed on my system. I am pretty sure this is NOT the culprit.

                                    just for your understanding. I haven’t choose the locale en_GB.UTF-8 in the dpkg-reconfigure step, but running the command

                                    python localize-folders.py -u mmustermann --lang en_GB.UTF-8
                                    

                                    or

                                    python localize-folders.py -u mmustermann --lang en_GB
                                    

                                    both succeed without errors.

                                    1 Reply Last reply Reply Quote 0
                                    • thctlo
                                      thctlo last edited by

                                      Hai, well what you did, is not know for us.
                                      We have to ask/verify these things.

                                      kopano 8.6.9 , then its a python2 to python3 bug.
                                      read : https://forum.kopano.io/topic/777/kopano-localize-folders
                                      same…

                                      1 Reply Last reply Reply Quote 0
                                      • micro
                                        micro last edited by micro

                                        locale -a
                                        

                                        C
                                        C.UTF-8
                                        de_DE.utf8
                                        en_US.utf8
                                        POSIX

                                        the --verbose switch gives me this result

                                        Localizing user: mmustermann
                                        Changing localized folder names to "de_DE.UTF-8"
                                        Running in verbose mode
                                        Renaming MAPI Folder "junk" -> From "Junk E-Mail" To "Junk E-Mail"
                                        Renaming MAPI Folder "tasks" -> From "Aufgaben" To "Aufgaben"
                                        Renaming MAPI Folder "journal" -> From "Journal" To "Journal"
                                        Renaming MAPI Folder "wastebasket" -> From "Deleted Items" To "Gelöschte Objekte"
                                        'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)
                                        

                                        seems that the script succeeded in renaming the first four folders but fails at the next step. Maybe because of German Umlaut?

                                        1 Reply Last reply Reply Quote 0
                                        • thctlo
                                          thctlo last edited by

                                          yeah, that is why i say its a python2 => 3 bug.

                                          I’ve seen dozens of these on the samba bug list.
                                          I just can not debug these myself (sorry), im not a coder.

                                          1 Reply Last reply Reply Quote 0
                                          • micro
                                            micro last edited by

                                            the user @robing links to an updated version of the script which works fine for the user @sebschremser but I cannot access/download it because I have no Bitbucket account. Can I download this updated script somewhere else from?

                                            thctlo fbartels 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post