| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\App\Services\Translations; |
| 4 |
class TransStrings |
| 5 |
{ |
| 6 |
public static function getStrings(): array |
| 7 |
{ |
| 8 |
$translations = require 'admin-translation.php'; |
| 9 |
return apply_filters("fluent_cart/admin_translations", $translations, []); |
| 10 |
} |
| 11 |
|
| 12 |
public static function blockStrings(): array |
| 13 |
{ |
| 14 |
$translations = require 'block-editor-translation.php'; |
| 15 |
return apply_filters("fluent_cart/blocks_translations", $translations, []); |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
public static function getShopAppBlockEditorString(): array |
| 20 |
{ |
| 21 |
|
| 22 |
return [ |
| 23 |
'Also search in Content' => _x('Also search in Content', 'Shop App Block Editor', 'fluent-cart'), |
| 24 |
'Apply Filter' => _x('Apply Filter', 'Shop App Block Editor', 'fluent-cart'), |
| 25 |
// 'Add to Cart' => _x('Add to Cart', 'Shop App Block Editor', 'fluent-cart'), |
| 26 |
'Default' => _x('Default', 'Shop App Block Editor', 'fluent-cart'), |
| 27 |
'Display Name For Filter' => _x('Display Name For Filter', 'Shop App Block Editor', 'fluent-cart'), |
| 28 |
'Enable Default Filtering' => _x('Enable Default Filtering', 'Shop App Block Editor', 'fluent-cart'), |
| 29 |
'Enable Filtering' => _x('Enable Filtering', 'Shop App Block Editor', 'fluent-cart'), |
| 30 |
'Enable' => _x('Enable', 'Shop App Block Editor', 'fluent-cart'), |
| 31 |
'Enabled?' => _x('Enabled?', 'Shop App Block Editor', 'fluent-cart'), |
| 32 |
'Filter Option' => _x('Filter Option', 'Shop App Block Editor', 'fluent-cart'), |
| 33 |
'Grid' => _x('Grid', 'Shop App Block Editor', 'fluent-cart'), |
| 34 |
'List' => _x('List', 'Shop App Block Editor', 'fluent-cart'), |
| 35 |
'Numbers' => _x('Numbers', 'Shop App Block Editor', 'fluent-cart'), |
| 36 |
'Option' => _x('Option', 'Shop App Block Editor', 'fluent-cart'), |
| 37 |
'Paginator' => _x('Paginator', 'Shop App Block Editor', 'fluent-cart'), |
| 38 |
'Per Page' => _x('Per Page', 'Shop App Block Editor', 'fluent-cart'), |
| 39 |
'Product Box Grid Size' => _x('Product Box Grid Size', 'Shop App Block Editor', 'fluent-cart'), |
| 40 |
'Product Categories' => _x('Product Categories', 'Shop App Block Editor', 'fluent-cart'), |
| 41 |
'Product Grid Size' => _x('Product Grid Size', 'Shop App Block Editor', 'fluent-cart'), |
| 42 |
'Product Types' => _x('Product Types', 'Shop App Block Editor', 'fluent-cart'), |
| 43 |
'Product' => _x('Product', 'Shop App Block Editor', 'fluent-cart'), |
| 44 |
'Range Filter Only works in pages.' => _x('Range Filter Only works in pages.', 'Shop App Block Editor', 'fluent-cart'), |
| 45 |
'Scroll' => _x('Scroll', 'Shop App Block Editor', 'fluent-cart'), |
| 46 |
'Search Grid Size' => _x('Search Grid Size', 'Shop App Block Editor', 'fluent-cart'), |
| 47 |
'Search' => _x('Search', 'Shop App Block Editor', 'fluent-cart'), |
| 48 |
'View mode' => _x('View mode', 'Shop App Block Editor', 'fluent-cart'), |
| 49 |
'Wildcard Filter' => _x('Wildcard Filter', 'Shop App Block Editor', 'fluent-cart'), |
| 50 |
|
| 51 |
'Primary' => _x('Primary', 'Shop App Block Editor', 'fluent-cart'), |
| 52 |
'Product Heading' => _x('Product Heading', 'Shop App Block Editor', 'fluent-cart'), |
| 53 |
'Text' => _x('Text', 'Shop App Block Editor', 'fluent-cart'), |
| 54 |
'Border' => _x('Border', 'Shop App Block Editor', 'fluent-cart'), |
| 55 |
'Badge Count Background' => _x('Badge Count Background', 'Shop App Block Editor', 'fluent-cart'), |
| 56 |
'Badge Count' => _x('Badge Count', 'Shop App Block Editor', 'fluent-cart'), |
| 57 |
'Badge Count Border' => _x('Badge Count Border', 'Shop App Block Editor', 'fluent-cart'), |
| 58 |
|
| 59 |
|
| 60 |
'Background' => _x('Background', 'Shop App Block Editor', 'fluent-cart'), |
| 61 |
'Input Border' => _x('Input Border', 'Shop App Block Editor', 'fluent-cart'), |
| 62 |
'Input Focus Border' => _x('Input Focus Border', 'Shop App Block Editor', 'fluent-cart'), |
| 63 |
'Heading' => _x('Heading', 'Shop App Block Editor', 'fluent-cart'), |
| 64 |
'Label' => _x('Label', 'Shop App Block Editor', 'fluent-cart'), |
| 65 |
'Item Border' => _x('Item Border', 'Shop App Block Editor', 'fluent-cart'), |
| 66 |
'Reset Button Bg' => _x('Reset Button Bg', 'Shop App Block Editor', 'fluent-cart'), |
| 67 |
'Reset Button' => _x('Reset Button', 'Shop App Block Editor', 'fluent-cart'), |
| 68 |
'Reset Button Border' => _x('Reset Button Border', 'Shop App Block Editor', 'fluent-cart'), |
| 69 |
'Reset Button Hover Bg' => _x('Reset Button Hover Bg', 'Shop App Block Editor', 'fluent-cart'), |
| 70 |
'Reset Button Hover' => _x('Reset Button Hover', 'Shop App Block Editor', 'fluent-cart'), |
| 71 |
'Reset Button Hover Border' => _x('Reset Button Hover Border', 'Shop App Block Editor', 'fluent-cart'), |
| 72 |
'Checkbox' => _x('Checkbox', 'Shop App Block Editor', 'fluent-cart'), |
| 73 |
'Checkbox Active' => _x('Checkbox Active', 'Shop App Block Editor', 'fluent-cart'), |
| 74 |
'Checkmark Bg' => _x('Checkmark Bg', 'Shop App Block Editor', 'fluent-cart'), |
| 75 |
'Checkmark Border' => _x('Checkmark Border', 'Shop App Block Editor', 'fluent-cart'), |
| 76 |
'Checkmark Active Bg' => _x('Checkmark Active Bg', 'Shop App Block Editor', 'fluent-cart'), |
| 77 |
'Checkmark Active Border' => _x('Checkmark Active Border', 'Shop App Block Editor', 'fluent-cart'), |
| 78 |
'Checkmark After Border' => _x('Checkmark After Border', 'Shop App Block Editor', 'fluent-cart'), |
| 79 |
'Range Slider Connect Bg' => _x('Range Slider Connect Bg', 'Shop App Block Editor', 'fluent-cart'), |
| 80 |
|
| 81 |
]; |
| 82 |
} |
| 83 |
|
| 84 |
public static function getCustomerProfileString(): array |
| 85 |
{ |
| 86 |
$translations = require 'customer-profile-translation.php'; |
| 87 |
return apply_filters("fluent_cart/customer_profile_translations", $translations, []); |
| 88 |
} |
| 89 |
|
| 90 |
public static function singleProductPageString(): array |
| 91 |
{ |
| 92 |
return [ |
| 93 |
'In Stock' => _x('In Stock', 'Single Product Page', 'fluent-cart'), |
| 94 |
'Out Of Stock' => _x('Out Of Stock', 'Single Product Page', 'fluent-cart'), |
| 95 |
'Package' => _x('Package', 'Single Product Page', 'fluent-cart'), |
| 96 |
'Dimensions' => _x('Dimensions', 'Single Product Page', 'fluent-cart'), |
| 97 |
'Weight' => _x('Weight', 'Single Product Page', 'fluent-cart'), |
| 98 |
'Shipping Weight' => _x('Shipping Weight', 'Single Product Page', 'fluent-cart'), |
| 99 |
]; |
| 100 |
} |
| 101 |
|
| 102 |
public static function checkoutPageString() |
| 103 |
{ |
| 104 |
$translations = require 'checkout-translation.php'; |
| 105 |
return apply_filters("fluent_cart/checkout_translations", $translations, []); |
| 106 |
} |
| 107 |
|
| 108 |
public static function paymentsString() |
| 109 |
{ |
| 110 |
$translations = require 'payments-translation.php'; |
| 111 |
return apply_filters("fluent_cart/payments_translations", $translations, []); |
| 112 |
} |
| 113 |
|
| 114 |
public static function elStrings(): array |
| 115 |
{ |
| 116 |
return [ |
| 117 |
'name' => get_locale(), |
| 118 |
'el' => [ |
| 119 |
'breadcrumb' => [ |
| 120 |
'label' => __('Breadcrumb', 'fluent-cart'), |
| 121 |
], |
| 122 |
'colorpicker' => [ |
| 123 |
'confirm' => __('OK', 'fluent-cart'), |
| 124 |
'clear' => __('Clear', 'fluent-cart'), |
| 125 |
'defaultLabel' => __('color picker', 'fluent-cart'), |
| 126 |
'description' => __('current color is {color}. press enter to select a new color.', 'fluent-cart'), |
| 127 |
'alphaLabel' => __('pick alpha value', 'fluent-cart'), |
| 128 |
'alphaDescription' => __('alpha {alpha}, current color is {color}', 'fluent-cart'), |
| 129 |
'hueLabel' => __('pick hue value', 'fluent-cart'), |
| 130 |
'hueDescription' => __('hue {hue}, current color is {color}', 'fluent-cart'), |
| 131 |
'svLabel' => __('pick saturation and brightness value', 'fluent-cart'), |
| 132 |
'svDescription' => __('saturation {saturation}, brightness {brightness}, current color is {color}', 'fluent-cart'), |
| 133 |
'predefineDescription' => __('select {value} as the color', 'fluent-cart'), |
| 134 |
], |
| 135 |
'datepicker' => [ |
| 136 |
'now' => __('Now', 'fluent-cart'), |
| 137 |
'today' => __('Today', 'fluent-cart'), |
| 138 |
'cancel' => __('Cancel', 'fluent-cart'), |
| 139 |
'clear' => __('Clear', 'fluent-cart'), |
| 140 |
'confirm' => __('OK', 'fluent-cart'), |
| 141 |
'dateTablePrompt' => __('Use the arrow keys and enter to select the day of the month', 'fluent-cart'), |
| 142 |
'monthTablePrompt' => __('Use the arrow keys and enter to select the month', 'fluent-cart'), |
| 143 |
'yearTablePrompt' => __('Use the arrow keys and enter to select the year', 'fluent-cart'), |
| 144 |
'selectedDate' => __('Selected date', 'fluent-cart'), |
| 145 |
'selectDate' => __('Select date', 'fluent-cart'), |
| 146 |
'selectTime' => __('Select time', 'fluent-cart'), |
| 147 |
'startDate' => __('Start Date', 'fluent-cart'), |
| 148 |
'startTime' => __('Start Time', 'fluent-cart'), |
| 149 |
'endDate' => __('End Date', 'fluent-cart'), |
| 150 |
'endTime' => __('End Time', 'fluent-cart'), |
| 151 |
'prevYear' => __('Previous Year', 'fluent-cart'), |
| 152 |
'nextYear' => __('Next Year', 'fluent-cart'), |
| 153 |
'prevMonth' => __('Previous Month', 'fluent-cart'), |
| 154 |
'nextMonth' => __('Next Month', 'fluent-cart'), |
| 155 |
'year' => __('', 'fluent-cart'), |
| 156 |
'month1' => __('January', 'fluent-cart'), |
| 157 |
'month2' => __('February', 'fluent-cart'), |
| 158 |
'month3' => __('March', 'fluent-cart'), |
| 159 |
'month4' => __('April', 'fluent-cart'), |
| 160 |
'month5' => __('May', 'fluent-cart'), |
| 161 |
'month6' => __('June', 'fluent-cart'), |
| 162 |
'month7' => __('July', 'fluent-cart'), |
| 163 |
'month8' => __('August', 'fluent-cart'), |
| 164 |
'month9' => __('September', 'fluent-cart'), |
| 165 |
'month10' => __('October', 'fluent-cart'), |
| 166 |
'month11' => __('November', 'fluent-cart'), |
| 167 |
'month12' => __('December', 'fluent-cart'), |
| 168 |
'weeks' => [ |
| 169 |
'sun' => __('Sun', 'fluent-cart'), |
| 170 |
'mon' => __('Mon', 'fluent-cart'), |
| 171 |
'tue' => __('Tue', 'fluent-cart'), |
| 172 |
'wed' => __('Wed', 'fluent-cart'), |
| 173 |
'thu' => __('Thu', 'fluent-cart'), |
| 174 |
'fri' => __('Fri', 'fluent-cart'), |
| 175 |
'sat' => __('Sat', 'fluent-cart'), |
| 176 |
], |
| 177 |
'weeksFull' => [ |
| 178 |
'sun' => __('Sunday', 'fluent-cart'), |
| 179 |
'mon' => __('Monday', 'fluent-cart'), |
| 180 |
'tue' => __('Tuesday', 'fluent-cart'), |
| 181 |
'wed' => __('Wednesday', 'fluent-cart'), |
| 182 |
'thu' => __('Thursday', 'fluent-cart'), |
| 183 |
'fri' => __('Friday', 'fluent-cart'), |
| 184 |
'sat' => __('Saturday', 'fluent-cart'), |
| 185 |
], |
| 186 |
'months' => [ |
| 187 |
'jan' => __('Jan', 'fluent-cart'), |
| 188 |
'feb' => __('Feb', 'fluent-cart'), |
| 189 |
'mar' => __('Mar', 'fluent-cart'), |
| 190 |
'apr' => __('Apr', 'fluent-cart'), |
| 191 |
'may' => __('May', 'fluent-cart'), |
| 192 |
'jun' => __('Jun', 'fluent-cart'), |
| 193 |
'jul' => __('Jul', 'fluent-cart'), |
| 194 |
'aug' => __('Aug', 'fluent-cart'), |
| 195 |
'sep' => __('Sep', 'fluent-cart'), |
| 196 |
'oct' => __('Oct', 'fluent-cart'), |
| 197 |
'nov' => __('Nov', 'fluent-cart'), |
| 198 |
'dec' => __('Dec', 'fluent-cart'), |
| 199 |
], |
| 200 |
], |
| 201 |
'inputNumber' => [ |
| 202 |
'decrease' => __('decrease number', 'fluent-cart'), |
| 203 |
'increase' => __('increase number', 'fluent-cart'), |
| 204 |
], |
| 205 |
'select' => [ |
| 206 |
'loading' => __('Loading', 'fluent-cart'), |
| 207 |
'noMatch' => __('No matching data', 'fluent-cart'), |
| 208 |
'noData' => __('No data', 'fluent-cart'), |
| 209 |
'placeholder' => __('Select', 'fluent-cart'), |
| 210 |
], |
| 211 |
'mention' => [ |
| 212 |
'loading' => __('Loading', 'fluent-cart'), |
| 213 |
], |
| 214 |
'dropdown' => [ |
| 215 |
'toggleDropdown' => __('Toggle Dropdown', 'fluent-cart'), |
| 216 |
], |
| 217 |
'cascader' => [ |
| 218 |
'noMatch' => __('No matching data', 'fluent-cart'), |
| 219 |
'loading' => __('Loading', 'fluent-cart'), |
| 220 |
'placeholder' => __('Select', 'fluent-cart'), |
| 221 |
'noData' => __('No data', 'fluent-cart'), |
| 222 |
], |
| 223 |
'pagination' => [ |
| 224 |
'goto' => __('Go to', 'fluent-cart'), |
| 225 |
'pagesize' => __('/page', 'fluent-cart'), |
| 226 |
'total' => __('Total {total}', 'fluent-cart'), |
| 227 |
'pageClassifier' => __('', 'fluent-cart'), |
| 228 |
'page' => __('Page', 'fluent-cart'), |
| 229 |
'prev' => __('Go to previous page', 'fluent-cart'), |
| 230 |
'next' => __('Go to next page', 'fluent-cart'), |
| 231 |
'currentPage' => __('page {pager}', 'fluent-cart'), |
| 232 |
'prevPages' => __('Previous {pager} pages', 'fluent-cart'), |
| 233 |
'nextPages' => __('Next {pager} pages', 'fluent-cart'), |
| 234 |
//'deprecationWarning' => __('Deprecated usages detected, please refer to the el-pagination documentation for more details', 'fluent-cart'), |
| 235 |
], |
| 236 |
'dialog' => [ |
| 237 |
'close' => __('Close this dialog', 'fluent-cart'), |
| 238 |
], |
| 239 |
'drawer' => [ |
| 240 |
'close' => __('Close this drawer', 'fluent-cart'), |
| 241 |
], |
| 242 |
'messagebox' => [ |
| 243 |
'title' => __('Message', 'fluent-cart'), |
| 244 |
'confirm' => __('OK', 'fluent-cart'), |
| 245 |
'cancel' => __('Cancel', 'fluent-cart'), |
| 246 |
'error' => __('Illegal input', 'fluent-cart'), |
| 247 |
'close' => __('Close this dialog', 'fluent-cart'), |
| 248 |
], |
| 249 |
'upload' => [ |
| 250 |
'deleteTip' => __('press delete to remove', 'fluent-cart'), |
| 251 |
'delete' => __('Delete', 'fluent-cart'), |
| 252 |
'preview' => __('Preview', 'fluent-cart'), |
| 253 |
'continue' => __('Continue', 'fluent-cart'), |
| 254 |
], |
| 255 |
'slider' => [ |
| 256 |
'defaultLabel' => __('slider between {min} and {max}', 'fluent-cart'), |
| 257 |
'defaultRangeStartLabel' => __('pick start value', 'fluent-cart'), |
| 258 |
'defaultRangeEndLabel' => __('pick end value', 'fluent-cart'), |
| 259 |
], |
| 260 |
'table' => [ |
| 261 |
'emptyText' => __('No Data', 'fluent-cart'), |
| 262 |
'confirmFilter' => __('Confirm', 'fluent-cart'), |
| 263 |
'resetFilter' => __('Reset', 'fluent-cart'), |
| 264 |
'clearFilter' => __('All', 'fluent-cart'), |
| 265 |
'sumText' => __('Sum', 'fluent-cart'), |
| 266 |
], |
| 267 |
'tour' => [ |
| 268 |
'next' => __('Next', 'fluent-cart'), |
| 269 |
'previous' => __('Previous', 'fluent-cart'), |
| 270 |
'finish' => __('Finish', 'fluent-cart'), |
| 271 |
'close' => __('Close this dialog', 'fluent-cart'), |
| 272 |
], |
| 273 |
'tree' => [ |
| 274 |
'emptyText' => __('No Data', 'fluent-cart'), |
| 275 |
], |
| 276 |
'transfer' => [ |
| 277 |
'noMatch' => __('No matching data', 'fluent-cart'), |
| 278 |
'noData' => __('No data', 'fluent-cart'), |
| 279 |
'titles' => [__('List 1', 'fluent-cart'), __('List 2', 'fluent-cart')], |
| 280 |
'filterPlaceholder' => __('Enter keyword', 'fluent-cart'), |
| 281 |
'noCheckedFormat' => __('{total} items', 'fluent-cart'), |
| 282 |
'hasCheckedFormat' => __('{checked}/{total} checked', 'fluent-cart'), |
| 283 |
], |
| 284 |
'image' => [ |
| 285 |
'error' => __('FAILED', 'fluent-cart'), |
| 286 |
], |
| 287 |
'pageHeader' => [ |
| 288 |
'title' => __('Back', 'fluent-cart'), |
| 289 |
], |
| 290 |
'popconfirm' => [ |
| 291 |
'confirmButtonText' => __('Yes', 'fluent-cart'), |
| 292 |
'cancelButtonText' => __('No', 'fluent-cart'), |
| 293 |
], |
| 294 |
'carousel' => [ |
| 295 |
'leftArrow' => __('Carousel arrow left', 'fluent-cart'), |
| 296 |
'rightArrow' => __('Carousel arrow right', 'fluent-cart'), |
| 297 |
'indicator' => __('Carousel switch to index {index}', 'fluent-cart'), |
| 298 |
], |
| 299 |
], |
| 300 |
]; |
| 301 |
} |
| 302 |
|
| 303 |
public static function dateTimeStrings(): array |
| 304 |
{ |
| 305 |
return [ |
| 306 |
'weekdays' => array( |
| 307 |
'sunday' => _x('Sunday', 'weekdays', 'fluent-cart'), |
| 308 |
'monday' => _x('Monday', 'weekdays', 'fluent-cart'), |
| 309 |
'tuesday' => _x('Tuesday', 'weekdays', 'fluent-cart'), |
| 310 |
'wednesday' => _x('Wednesday', 'weekdays', 'fluent-cart'), |
| 311 |
'thursday' => _x('Thursday', 'weekdays', 'fluent-cart'), |
| 312 |
'friday' => _x('Friday', 'weekdays', 'fluent-cart'), |
| 313 |
'saturday' => _x('Saturday', 'weekdays', 'fluent-cart'), |
| 314 |
), |
| 315 |
'months' => array( |
| 316 |
'January' => _x('January', 'months', 'fluent-cart'), |
| 317 |
'February' => _x('February', 'months', 'fluent-cart'), |
| 318 |
'March' => _x('March', 'months', 'fluent-cart'), |
| 319 |
'April' => _x('April', 'months', 'fluent-cart'), |
| 320 |
'May' => _x('May', 'months', 'fluent-cart'), |
| 321 |
'June' => _x('June', 'months', 'fluent-cart'), |
| 322 |
'July' => _x('July', 'months', 'fluent-cart'), |
| 323 |
'August' => _x('August', 'months', 'fluent-cart'), |
| 324 |
'September' => _x('September', 'months', 'fluent-cart'), |
| 325 |
'October' => _x('October', 'months', 'fluent-cart'), |
| 326 |
'November' => _x('November', 'months', 'fluent-cart'), |
| 327 |
'December' => _x('December', 'months', 'fluent-cart') |
| 328 |
), |
| 329 |
'weekdaysShort' => array( |
| 330 |
'sun' => _x('Sun', 'weekdaysShort', 'fluent-cart'), |
| 331 |
'mon' => _x('Mon', 'weekdaysShort', 'fluent-cart'), |
| 332 |
'tue' => _x('Tue', 'weekdaysShort', 'fluent-cart'), |
| 333 |
'wed' => _x('Wed', 'weekdaysShort', 'fluent-cart'), |
| 334 |
'thu' => _x('Thu', 'weekdaysShort', 'fluent-cart'), |
| 335 |
'fri' => _x('Fri', 'weekdaysShort', 'fluent-cart'), |
| 336 |
'sat' => _x('Sat', 'weekdaysShort', 'fluent-cart') |
| 337 |
), |
| 338 |
'monthsShort' => array( |
| 339 |
'jan' => _x('Jan', 'monthsShort', 'fluent-cart'), |
| 340 |
'feb' => _x('Feb', 'monthsShort', 'fluent-cart'), |
| 341 |
'mar' => _x('Mar', 'monthsShort', 'fluent-cart'), |
| 342 |
'apr' => _x('Apr', 'monthsShort', 'fluent-cart'), |
| 343 |
'may' => _x('May', 'monthsShort', 'fluent-cart'), |
| 344 |
'jun' => _x('Jun', 'monthsShort', 'fluent-cart'), |
| 345 |
'jul' => _x('Jul', 'monthsShort', 'fluent-cart'), |
| 346 |
'aug' => _x('Aug', 'monthsShort', 'fluent-cart'), |
| 347 |
'sep' => _x('Sep', 'monthsShort', 'fluent-cart'), |
| 348 |
'oct' => _x('Oct', 'monthsShort', 'fluent-cart'), |
| 349 |
'nov' => _x('Nov', 'monthsShort', 'fluent-cart'), |
| 350 |
'dec' => _x('Dec', 'monthsShort', 'fluent-cart') |
| 351 |
), |
| 352 |
'am' => __('AM', 'fluent-cart'), |
| 353 |
'pm' => __('PM', 'fluent-cart'), |
| 354 |
'numericSystem' => _x('0_1_2_3_4_5_6_7_8_9', 'numeric system - Sequence must need to maintained', 'fluent-cart'), |
| 355 |
]; |
| 356 |
} |
| 357 |
} |
| 358 |
|