Commit Graph

125 Commits

Author SHA1 Message Date
Ralf Becker
85695f0d41 split html class to Api\Html, Api\Header\Content, Api\Header\UserAgent and translation 2016-03-13 11:22:44 +00:00
Ralf Becker
49f75bc8dd move non-mail specific methods of translation class to Api\Translation 2016-03-05 10:47:20 +00:00
Klaus Leithoff
cf54b25ca2 attempt to improve html2text conversion 2016-02-02 12:57:21 +00:00
Nathan Gray
e02202982f Re-implement get_message_id() to check cache too.
Fixes(?) troubles with using default import definitions with languages other than english.
2015-11-30 22:59:26 +00:00
Klaus Leithoff
23fdf1c46e * Mail/API: some servers do report capabilities that they do not fully support; thus relying on those results in failure; use hordes capability_ignore to avoid the problems;map charset ks_c_5601-1987 to CP949 as the former is not supported by php(s) conversion functions and should be mapped to the latter 2015-10-22 11:15:26 +00:00
Klaus Leithoff
397d5a6d36 fix problem with possible json_encode problem (removing all initial data from mailbody) on reply/forward 2015-09-24 10:06:22 +00:00
Klaus Leithoff
4f728727af silence warning 2015-09-15 11:30:05 +00:00
Ralf Becker
e3f6fe6104 only use tree-wide load_via array, but do some sanity checks before using it (need to contain all stock keys), to fix not loaded (common) translations, cleaning up some IDE warnings 2015-04-26 11:00:01 +00:00
Ralf Becker
0c9cc9bdbd using php version depending default_charset or mbstring.internal_encoding 2014-12-09 16:46:37 +00:00
Ralf Becker
2c71852545 fix for php 5.6+ deprecating mbstring.internal_encoding in favor or default_charset 2014-12-08 19:16:44 +00:00
Klaus Leithoff
d5715314d9 remove quotes enclosing mailaddresses on replaceEmailAdresses when replacing style <email@adress.es> to email@adress.es addresses 2014-11-11 10:29:58 +00:00
Nathan Gray
08e1ce3c9e Keep custom translations as highest precidence.
Fixes loading translations for another app loses custom translations
2014-10-14 16:03:50 +00:00
Klaus Leithoff
d54c88e047 * Mail: fix for messed up plain-text signature in some cases 2014-10-10 10:10:36 +00:00
Ralf Becker
b3a9da635f moved translation statistics logic and caching to translation class 2014-06-28 11:47:32 +00:00
Ralf Becker
95b89a0c9f fixed under some conditions not working translations, caused by egw object calling translation::init and preceeding lang_arr with (en) translations, before lang.php calls add_app() with a single translation, now explicitly calling init() and init() allways empties lang_arr 2014-06-12 10:07:57 +00:00
Ralf Becker
baf7e2e97a remove unnecessary and in PHP 5.5 deprecated preg_replace /e modifier 2014-05-26 14:29:40 +00:00
Klaus Leithoff
7434cd7144 * Mail: fix for messed up signature in some cases; fix for not beeing able to delete/remave an attachment to a new mail that was attached using PRESET methods 2014-04-29 09:53:47 +00:00
Klaus Leithoff
04760c6510 rework of translation::replaceTagsCompletley as the prior method removed too much in rare cases 2014-04-14 15:09:07 +00:00
Klaus Leithoff
a46398da52 move groupdav to_ascii to translation class; unify content_header and content_disposition_header to be used by all downloads; adapt vfs_webdav_server thereof; try to improve replaceTagsCompletley 2014-02-25 15:48:23 +00:00
Ralf Becker
796663c2a6 fixed modified translations were not automatic loaded after new login 2014-02-21 11:10:11 +00:00
Ralf Becker
6927f61614 quieten permanent error-log 2014-01-10 09:01:41 +00:00
Ralf Becker
400240f1e4 caching translations for 10days and changing translation url, when translations are changing --> saves server-roundtrip for each translation 2014-01-09 15:32:07 +00:00
Ralf Becker
0bb8093426 fixed translations on client-side: server sends now currentapp and langRequire to client, which uses that to translate phrases, langRequire is only stored in egw object for matching app-name and window! 2013-10-07 17:00:03 +00:00
Klaus Leithoff
5e425398fa change convertHTMLToText behavior, regarding the replacing of CRLF or LF to single space; now removing them completely, when text to be processed is regarded to be html 2013-09-18 12:14:59 +00:00
Klaus Leithoff
f5e00e4bad add (and use) preg replace callback for mailto link to text transformation 2013-08-29 10:39:08 +00:00
Ralf Becker
59c683c359 removed ancient "mark untranslated strings with *" site configuration, as it is unnecessary and breaks links-stream-wrapper and WebDAV 2013-07-25 12:18:08 +00:00
Klaus Leithoff
80f74e5449 * Tracker: fix bug regarding the save of replys that could be regarded as empty (only span with style, no content) 2013-05-07 11:38:44 +00:00
Klaus Leithoff
e589930fd8 rework of link to text functionality when converting HTML to Text 2013-04-25 14:18:49 +00:00
Ralf Becker
ea6e8c8e94 * ImportExport: do NOT complain about wrong charset, if text contains only standard ascii chars 2013-03-01 09:51:02 +00:00
Klaus Leithoff
3fcc703375 do not try to break out of egw server root when iterating over all apps 2013-02-26 11:08:20 +00:00
Klaus Leithoff
a09ef26c5c use monospace fontstyle for plaintext edit; preserve whitespace (horizontal AND vertical) if mail is plaintext (not containing any html) 2013-02-22 10:58:39 +00:00
Ralf Becker
151b800a5a ignore . and .., as it gives an open_basedir warning, it is no application directory anyway 2013-02-21 06:32:30 +00:00
Klaus Leithoff
c3d2170518 remove CR from start and end of lang string line read from file, as it breaks stuff e.g. in eMail module 2012-12-12 10:18:40 +00:00
Klaus Leithoff
36bc7871c1 * API/Translation: fix bug with missing german umlauts as first letter of words; ( as php5.3.3 with squeeze does not support splitting lines with fgetcsv while reading properly if the first letter after the delimiter is a german umlaut (UTF8 representation thereoff)) 2012-12-12 09:42:56 +00:00
Klaus Leithoff
6a2b8882de for replaceTagsCompletely modify the prex for singeltons (as we are in Ungreedy mode, so we expect * to be ungreedy without specifying ?) 2012-12-04 14:13:36 +00:00
Ralf Becker
b82f6516e8 fixed not load translations if depending on multiple files and maintaining load_via in tree-wide cache 2012-11-16 09:21:17 +00:00
Klaus Leithoff
3420b15ff4 mailheader-decoding: check if there is a possible nested encoding; make sure that the inputstring and the decoded result are different before recursively calling decodeMailHeader on the decoded result (to avoid loops) 2012-11-07 11:46:14 +00:00
Ralf Becker
1e53272309 loading all translations in one go from cachem, saving some latency 2012-11-05 13:24:52 +00:00
Ralf Becker
a709f6104f * Setup/API: translations are no longer installed in database, but loaded directly from lang-files into tree-level cache 2012-11-05 12:18:22 +00:00
Klaus Leithoff
5b295573dd introduce detect_encoding functionality as a static function (used in decodeMailHeader as of now) 2012-10-24 10:54:44 +00:00
Klaus Leithoff
6fc8e208c1 add rarely used charset mswin1252; seems to be a variation of windows-1252 2012-08-01 14:53:33 +00:00
Klaus Leithoff
c00e9756eb when converting HTML 2 Text remove style,head and comment style browser-switch 2012-06-04 14:56:45 +00:00
Ralf Becker
dc17cfbb47 * API: support windows-1256 via iconv and prefer iconv for windows-1252 too 2012-06-04 11:58:08 +00:00
Klaus Leithoff
2509d7783f attempt of switching from htmlpurifier to htmLawed and replacing kses by htmLawed calls; this is done for performance and resource considerations; still the common call in egw is by html::purify, but htmLawed is doing the work now. let me know if there are issues regarding; if we cannot find issues within EGroupware, we will clean out the related sourcecode of kses and htmlpurifier with the next step 2012-05-25 12:23:11 +00:00
Ralf Becker
f676a23821 fixes for PHP 5.4 warnings and strict warnings, thought disabled E_STRICT for now, because of various strict warnings in working code, which could not be easy fixed in all areas (see comment in phpgwapi/inc/functions.inc.php) 2012-03-04 13:33:10 +00:00
Ralf Becker
d7a7d105fa * Admin/Setup: fixed custom translations got lost during update 2012-02-27 08:02:28 +00:00
Nathan Gray
03bae6ff27 Add CP850 to translation class list of installed charsets, don't need to add it in import/export 2011-12-14 21:34:24 +00:00
Ralf Becker
075db1ac82 quietening permanent error_log 2011-11-30 09:37:47 +00:00
Ralf Becker
7ee9d55f85 fixed racecondition in caching translations for installs with multiple instances:
do NOT use automatic callback to cache result, as installing languages in setup can create a racecondition, therefore only cache existing non-instance-specific translations, never cache nothing found === array(), instance-specific translations can and should always be cached!
2011-11-30 09:20:05 +00:00
Ralf Becker
f2d7c5c6c3 * Custom / instance-specific translations, eg. to rename an application 2011-11-17 12:43:59 +00:00