Revision: 5876 http://ipcop.svn.sourceforge.net/ipcop/?rev=5876&view=rev Author: owes Date: 2011-09-24 18:17:37 +0000 (Sat, 24 Sep 2011) Log Message: ----------- Add some more comments. lang.pl already in update package due to mistake in commit 5874
Modified Paths: -------------- ipcop/trunk/src/libs/lang.pl Modified: ipcop/trunk/src/libs/lang.pl =================================================================== --- ipcop/trunk/src/libs/lang.pl 2011-09-24 09:46:51 UTC (rev 5875) +++ ipcop/trunk/src/libs/lang.pl 2011-09-24 18:17:37 UTC (rev 5876) @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# IPCop CGIs +# lang.pl: retrieve the translated texts for GUI # # This file is part of the IPCop Firewall. # @@ -15,10 +15,9 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with IPCop; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# along with IPCop. If not, see <http://www.gnu.org/licenses/>. # -# (c) 2007-2009, the IPCop team +# (c) 2007-2011, the IPCop team # # Copyright (c) 2007-11-13 owes This is almost a full cleanup, texts are now fetched from .MO files. # @@ -28,9 +27,9 @@ # When you want to add your own language strings/entries to IPCop, # you create a file with <PREFIX>.<LANG>.pl in the /var/ipcop/addons/lang directory -# <PREFIX> can be freely chosen but must be unique. An example could be "myAddonName" -# <LANG> is a mnemonic of the used language like en, de, it, nl etc. -# You can find a detailed list of possible mnemonic's in the file /var/ipcop/main/language.lst +# <PREFIX> can be freely chosen but must be unique. An example could be "myAddonName" +# <LANG> is a mnemonic of the used language like en, de, it, nl etc. +# You can find a detailed list of possible mnemonics in the file /var/ipcop/main/language.lst # A file could for example be named "myAddonName.en.pl". # # Note that you should always add 'en' (English) file, as this will be taken as the default for all @@ -80,6 +79,7 @@ $locale = $settings{'LOCALE'}; } +# call with 0 if main/settings already read (don't use in CGIs) # call with 1 to reread main/settings for language info (gui.cgi) # call with 2 to use en_GB as language (makegraphs) sub reload @@ -136,9 +136,9 @@ # Add our current language if it is not 'en' if ($language ne 'en') { - foreach my $file (grep (/.*\.$language\.pl$/,@files) ) { - do "$Lang::CacheDir/$file"; - } + foreach my $file (grep (/.*\.$language\.pl$/,@files) ) { + do "$Lang::CacheDir/$file"; + } } # Write assembled texts to file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn