Geeklog-Core / geeklog

Geeklog - The Secure CMS.
https://www.geeklog.net
24 stars 19 forks source link

Phing Language Synch Not Working Properly #1012

Closed eSilverStrike closed 4 years ago

eSilverStrike commented 4 years ago

I just synched the language files (because of staticpage language additions) and a large number of the core language files had all of the language variables deleted out of the files for some reason. There was no changes in the English language files for core so I am not sure why it happened.

I just reran the language synch with no changes in any of the language files and the same thing happened

eSilverStrike commented 4 years ago

It looks like all the core language files that end in "_utf8.php" have the issue. For example the file estonian.php synchs properly while the file estonian_utf-8.php does not and contains only the following text in it:

<?php

###############################################################################
# estonian_utf-8.php
# This is the Estonian language file for Geeklog!
#
# Copyright (C) 2000 Jason Whittenburg
# jwhitten@securitygeeks.com
#
# Estonian translation by Artur Räpp <rtr AT planet DOT ee>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
###############################################################################

Parse error: syntax error, unexpected '$LANG_CHARSET' (T_VARIABLE) in C:\wamp64\www\geeklogdev\language\estonian_utf-8.php on line 28
mystralkk commented 4 years ago

Fixed with change set 1f5da62. Somehow, UTF-8 BOM (\xEF\xBB\xBF) was contained in UTF-8 language files. So, I changed "lm.php" to detect and remove these byte order marks.