How to update a language po file

In group: Community Design & Support
Hi guys, this is a simple quick way to update your po files. It will work every time if you follow these steps below.

I'm only going to show you how to update the default.po file as an example.

Step. 1

Download notepad++

https://notepad-plus-plus.org/download/v6.9.1.html

Step. 2

Once you have installed and opened notepad++ go to the [ Plugins ] in the tab menus.

From the list select [ Plugin Manger ] then [ Show Plugin Manger ]

A window will now open. Scroll down and select [ Compare ] and [ tick the box ] then [ install ]

Notepad++ will reset once installed.

Step. 3

Find the untouched default.po file from ver.2.3.0+ zip that you downloaded from mooSocial.

From the zip file it would be something like this

\moosocial-2.3.0\app\Locale\eng\LC_MESSAGES\default.po

Now open with notepad++

The reason for this is because you need to find which strings have changed compared to the new ver.2.4.0. This is the quickest way to do it.

Step. 4

Find the untouched default.po file from ver.2.4.0 zip that you downloaded from mooSocial.

From the zip file it would be something like this

\moosocial-2.4.0\app\Locale\eng\LC_MESSAGES\default.po

Now open with notepad++

Step. 5

Now right click on the ver2.4.0 default.po tab in notepad to open the drop menu.

Step. 6
 
Select and click on the menu link [ Move to Other View ]

This will move the file to the right hand side.
 
Step. 7
 
From the plugin tab menu select and click [ Compare ] or press [ Alt+D ]

The screen will change with sidebars of the right hand side of ver2.4.0 default.po

Step.8
 
Scroll down until you find a change to the file text and colour in the sidebars.
 
This will be around line 7768

Step. 9
 
You will find in some areas that the strings are no longer needed. You do not need to add these to the new version 2.4.0
 
Also you will find that some strings are a little out of place. As longs as they match, there is no need to change the layout order of these at all - Do nothing!
 
Step. 10
 
From the image below you will see a green plus icon which indicates that this string is not in the older file. Now this is a new string so you need to add this to the end of your live server default.po file. I would just copy & paste them in to a text file for now until you have them all.

Step. 11
 
From the image below you see a warning triangle in yellow which indicates that the string is different. In this case it is an extra plural string that has been added.

You also need to add this to the text file you started earlier, then the new default.po file when you have finished collecting the strings.
 
Step. 12
 
Now continue colloecting the rest of the strings. When you have finished collecting all the strings in one file which have either changed or need updating follow the next step.
 
Step. 13
 
Now open your old default.po file and add these strings to the end of the file.
 
Step. 14
 
Save and test!
 
Step. 15
 
Now follow these steps for all other files that have changed - But I know it should only be this file
 
That's it!

P.S. - When you use notepad++ compare the line numbers may change due to extra space but once save will revert back to normal.
 
This is the string chages I have found
 
Updated file for eng default.po from 2.3.0+ to 2.4.0 - #ver240update

##########
CHANGE
##########

This:-

msgid "Your video is now being processed. We will send you a notification when it's ready to view"

To This:-

msgid "Your video is uploaded successfully, please standby while we converting your video."

###########

This:-

msgid "term of service."

To This:-

msgid "terms of service."

##########
All NEW
##########

msgid "Are you sure you want to delete this category? All parent of sub-category it will also be changed to ROOT. All items of this category will be deleted too. This cannot be undone!!"

msgid "Are you sure you want to delete this category? All parent of sub-category it will also be changed to ROOT. This cannot be undone!!"

msgid "Please select video to upload."

msgid "unable to find any group"

msgid "Are you sure you want to uninstall this hook?"

msgid "This site uses cookies to store your information on your computer."

msgid "Plugin Info"

msgid "*Please change permission of file "%s" to 0755"

###########
UPDATED STRING
###########

This:-

msgid "There is currently %s member online"
msgid_plural ""

To This:-

msgid "There is currently %s member online"
msgid_plural "There is currently %s members online"
 
 
Now you can use poedit to make any translation you need. You will need the Pro-Version if you want to edit the whole file as its over 7000 lines long. I would just use a smaller file to get around this untill you need the pro version.
 
 
 #Language
Posted in on 05/12/16 at 06:32
Comments (0)
No login
Login or register to post your comment
Cookies on mooCommunity - Social Networking Script.
This site uses cookies to store your information on your computer.