Commit Graph

27 Commits

Author SHA1 Message Date
Mafoo ae55af8848 Enhance - Text class (#3012)
try and preserve existing comments when organizing a language
2018-03-06 10:06:56 -07:00
Mafoo 874b4032e2 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 0ccafad11c 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 aa897aca47 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 22392cdff2 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 3c23fb5115 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 7ec01104f5 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 55ae0b2b42 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 543a555471 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 bca24ac04d 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 6f4c52d956 Prevent php warnings in the text php class. 2016-05-16 21:35:54 -06:00
markjcrane 6570f8cf40 Define the text array before it is used. 2016-04-29 15:32:55 -06:00
Harry G. Coin 91a92d8e5e \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 afe19e8a40 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 355bec91a2 changed text.php to use $_SERVER["PROJECT_ROOT"] 2016-01-14 16:15:41 +00:00
markjcrane 6d700faaa1 Add one line between each function. 2015-12-19 15:00:10 -07:00
Matthew Vale b5a2fa0f29 Added initial version of app/languages
for analyzing missing or overlapping with global text
2015-12-10 10:04:35 +00:00
Matthew Vale 45dfcabd3d Add Fallback language support to en-us 2015-12-10 09:57:54 +00:00
Matthew Vale e4c711e8f7 Migrate app_languages.php from core to resources 2015-12-10 09:57:08 +00:00
Matthew Vale b8ead99a14 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 900c1469b1 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 d1684a3511 Change require to include. 2015-01-20 06:44:12 +00:00
Nate Jones 852986a231 Text class fix. 2015-01-18 10:40:41 +00:00
Nate Jones 2346af5e4b Text Class: Fixes. 2015-01-18 09:25:50 +00:00
Mark Crane ee4890b01f 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 6244a12b64 Update classes/text.php 2015-01-18 07:42:17 +00:00
Mark Crane 7a3e20f926 Add a new text array that is used in the translations. 2015-01-18 06:36:00 +00:00