Commit Graph

32 Commits

Author SHA1 Message Date
FusionPBX 4d2d2453db Update text.php 2020-01-08 18:28:05 -07:00
Nate c72d7e61be Misc: Language and text class adjustments. 2019-12-19 07:28:27 -07:00
chansizzle ad1c5205d4 Update text.php (#4654) 2019-09-24 16:40:50 -06:00
Nate 37b5713c4b Misc Classes: Database class integration. 2019-09-04 06:44:50 -06:00
FusionPBX 157db18dc7 White space cleanup on the text class. 2019-05-25 23:40:51 -06:00
Mafoo 3a72a6e3c2 Enhance - Text class (#3012)
try and preserve existing comments when organizing a language
2018-03-06 10:06:56 -07:00
Mafoo 05f76b0556 Pass on languages before importing updates (#2849)
put language files into consistent state in preparation of a import
2017-09-19 09:48:40 -06:00
Mafoo 0098dd01c2 Enhance - text class autofill (#2679)
Try and auto fill a value when its blank an the same baseline language
has a value
2017-06-12 22:19:02 -07:00
FusionPBX db20220eef Create text.php
Switch require back to include what it was originally as it breaks too many things with little benefits.
2017-06-10 09:42:54 -06:00
Mafoo ed48da536c Enhance text class (#2670)
make the get routine a little more rugged by checking if the file exists not the directory it is in.
throw a exception if we are asked to load a app_languages that doesn't exist
don't reload the resources/app_languages if exclude_global was ommitted
code styling update to match project
2017-06-10 09:14:58 -06:00
Mafoo 8709d01fb0 BugFix [master] language update (#2628)
Imported Found language ro as ro-ro Romanian (tested by reverse translation)
Add placeholders for all found languages
Add new missing flags
Enhancements to text class
* improved sort to keep language-* tags organized at the top
* if a language is missing a name tag, add it
* changed organizer to not add a final \n
* corrected some indenting
* added detect_all_languages that attempts to find any languages that haven't been defined in resources/app_languages.php
* added language_totals, this is used by the optional languages application to calculate how complete a language is
2017-06-02 13:24:12 -06:00
Mafoo 13557c30ec BugFix [master] text class (#2598)
update escape_str to more reliabiliy escape the string into a consistent
format
2017-05-23 09:26:33 -06:00
Mafoo f44aee3bf8 Enhance - Convert all languages to 2-2 digit (#2581)
Convert all languages to use the en-us style codes
Where an installation is using a 2 digit code, use the legacy map to find
the mapped language and provide that text correctly
Have escape_str strip \' before converting or we end up with a double
encode
Update organzie_languages to understand how to convert legacy languages
automatically
updated flags
2017-05-13 13:13:38 -06:00
Mafoo 0302d8085c reworked text class to gather the languages on construction (more efficient) (#2576)
organize_languages will now use an internal function to escape values as fusion's check_str would not be appropriate
enabled two missing flags
organize on remaining app_languages.php and add missing 'he'
2017-05-12 08:44:53 -06:00
Mafoo 22dc22c30e BugFix [master] Languages add missing text placeholders (#2572)
* BugFix [master] Languages add missing text placeholders

add placeholders for missing language text
reorganise file so languages are in a consistent order with en-us always first, and the remaining stored alphabetically
space out tag names to make them line up for readability

* add organize_language to text class

also add get_languages
2017-05-10 13:40:46 -06:00
markjcrane 0ad7a4d82b Prevent php warnings in the text php class. 2016-05-16 21:35:54 -06:00
markjcrane e7dd30113b Define the text array before it is used. 2016-04-29 15:32:55 -06:00
Harry G. Coin bda6861f88 \r\n --> \n
Cause all the .php files containing lines ending with \r\n to instead end with \n.

DYI with:

find fusionpbx -type f -name '*.php' -exec dos2unix '{}' \;
2016-04-25 20:30:23 -05:00
markjcrane f924453e1c Change $language_name to $text['language-name'] this will follow current naming standards in app_languages.php and reduces code needed in the text class. 2016-03-12 22:06:57 -07:00
Matthew Vale b7e350b845 changed text.php to use $_SERVER["PROJECT_ROOT"] 2016-01-14 16:15:41 +00:00
markjcrane fba3fb039f Add one line between each function. 2015-12-19 15:00:10 -07:00
Matthew Vale fc9a45d313 Added initial version of app/languages
for analyzing missing or overlapping with global text
2015-12-10 10:04:35 +00:00
Matthew Vale e2cc65874d Add Fallback language support to en-us 2015-12-10 09:57:54 +00:00
Matthew Vale e3f1e919da Migrate app_languages.php from core to resources 2015-12-10 09:57:08 +00:00
Matthew Vale e66b2f831a added support to name the languages
added remaining flags i have from the famfamfam set and renamed them to country names
2015-11-17 16:20:14 +00:00
Matthew Vale b53999069c Enhancements to language support (for future use)
optimized the text.php to check the language code once, not every time
2015-11-16 09:41:34 +00:00
Mark Crane 8e1c7beb76 Change require to include. 2015-01-20 06:44:12 +00:00
Nate Jones c8da77eca1 Text class fix. 2015-01-18 10:40:41 +00:00
Nate Jones 8e7121b31e Text Class: Fixes. 2015-01-18 09:25:50 +00:00
Mark Crane b29c9ce2a2 Add the app session languages array as a list of available languages that have been translated for that application. 2015-01-18 07:52:28 +00:00
Mark Crane 53d377eeb2 Update classes/text.php 2015-01-18 07:42:17 +00:00
Mark Crane a8aa9bd611 Add a new text array that is used in the translations. 2015-01-18 06:36:00 +00:00