Skip to content

Commit

Permalink
Update to 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibin Grasic committed Mar 22, 2020
1 parent f6d8d04 commit 9ec4175
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 20 deletions.
19 changes: 18 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{
"name": "sgi/srbtranslatin",
"description": "SrbTransLatin - Serbian Latinisation plugin allows you to have a website in both cyrillic and latin scripts",
"keywords": [
"wordpress",
"transliteration",
"latinisation"
],
"homepage": "https://sgi.io/plugins/srbtranslatin",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Sibin Grasic",
"email": "[email protected]",
"homepage": "https://sgi.io"
}
],
"type": "wordpress-plugin",
"autoload": {
"files": [
"lib/Core/Utils.php",
Expand All @@ -11,7 +28,7 @@
}
},
"require": {
"simplehtmldom/simplehtmldom": "dev-master",
"simplehtmldom/simplehtmldom": "2.0-RC2",
"sgi/transliterator": "^1.0"
}
}
16 changes: 8 additions & 8 deletions lib/Admin/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ function(){},
[&$this, 'settings_page']
);

add_submenu_page(
'stl',
__('System Status - SrbTransLatin', DOMAIN),
__('System Status', DOMAIN),
'manage_options',
'stl_status',
[&$this, 'settings_page']
);
// add_submenu_page(
// 'stl',
// __('System Status - SrbTransLatin', DOMAIN),
// __('System Status', DOMAIN),
// 'manage_options',
// 'stl_status',
// [&$this, 'settings_page']
// );

remove_submenu_page('stl', 'stl');

Expand Down
6 changes: 0 additions & 6 deletions lib/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ public function sanitize_opts($opts)

foreach ($array as $opt) :



if (in_array($opt, $expert_settings)) :

if ($this->expert_enable) :
Expand Down Expand Up @@ -153,10 +151,6 @@ public function sanitize_opts($opts)

endif;

$opts['core']['versions'] = [
'2.0'
];

return $opts;

}
Expand Down
3 changes: 0 additions & 3 deletions lib/Core/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ function get_default_config()
{

return [
'versions' =>[
'2.0'
],
'migrated' => false,
'core' => [
'script' => 'cir',
Expand Down
148 changes: 148 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
=== SrbTransLatin - SrbTransLatin ===
Contributors: seebeen
Donate link: https://sgi.io/donate
Tags: letter, serbian, cyrillic, latin, transliteration, latinisation, script, multilanguage, wpml-compatible
Requires at least: 4.0
Tested up to: 5.3.2
Requires PHP: 7.0
Stable tag: 2.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

SrbTransLatin plugin allows you to use both Cyrillic and Latin scripts on your website.

== Description ==

### SrbTransLatin: The only WordPress transliteration plugin

SrbTransLatin enables you to have **both cyrillic and latin scripts** on your website. Transliteration is done in-place automatically.

If your content is written in cyrillic script, this plugin will allow your visitors to view the content both in cyrillic and latin scripts.
This plugin also fixes searching cyrillic posts using latin script.

### Features

* Works everywhere - Plugin hooks into WordPress core transliterating your content inplace
* **Auto-Fix permalinks** - Your cyrillic permalinks will be automatically saved as latin (optional)
* **SEARCH FIX** - Search posts written in cyrillic script using both latin and cyrillic script
* Lightweight - Plugin does not use any external stylesheets, or js files.
* **Partial transliteration** - You can selectively choose which parts of your website to keep in cyrilic
* WPML Compatible - Fully compatible with WPML. Transliteration only works on Serbian portion of your website
* Script / Language selector - Integrates into WPML language selectors in menu / widget
* **Widget Ready** - Switch script via sidebar widget

== Documentation ==

If you can't find your anwsers in the FAQ below, documentation can be found [here](https://rtfm.sgi.io/srbtranslatin)

== Authorship ==

Original version of this plugin was developer by [Predrag Supurović](https://pedja.supurovic.net/).
Plugin development was handed over to [me](https://sgi.io) in march 2020. Since then, I am the sole author and maintainer of the plugin

== Installation ==

1. Upload serbian-latinisation.zip to plugins via WordPress admin panel, or upload unzipped folder to your plugins folder
2. Activate the plugin through the "Plugins" menu in WordPress
3. Go to Settings->Latinisation to manage the options

== Frequently Asked Questions ==

= Can I use your plugin to transliterate my latin content into cyrillic? =

Short answer: No.

Long Answer: At the moment, no. Such conversions are very hard to do since HTML language is also written in latin script, and converting text only is very resource intensive process.

I'm currently working on a tool which will enable you to convert your latin content into cyrillic

= How can I keep parts of content in cyrilic? =

You can use [stl_cyr][/stl_cyr] shortcode. This will keep the shortcode text in cyrilic script, even when viewing latin version of the site.

= Will this plugin transliterate my page title into latin as well? =

Yes, it will.

= Will this plugin enable my visitors to search for content using latin script =

Yes it will. Plugin hooks into default WordPress search function and enables searching of cyrilic content using latin text on frontend

= Is this plugin Compatible with WPML =

Yes it is. It has no compatibility issues with WPML, since the transliteration core is being used only in serbian version of the website

= Will I be able to select script for Serbian language in WPML language Widget? =

Yes, Plugin fully integrates with all WPML functions on the frontend because it directly extends the available language list

= I'm having search issues - not all posts show up when searching for them using latin characters =

Open a support thread, or send me an e-mail.

= Your plugin is converting my cyrilic filenames into latin which prevents them from loading =

First - you shouldn't be using cyrilic filenames in the first place. Due to the fact that most hosting providers do not have full UTF-8 support.

I'm working on a tool which will convert filenames and post / page content on your website, so the errors will be automagically fixed

Temporary fix: redownload all attachments with cyrilic filenames and reupload them. This plugin will do an on-the-fly conversion of filenames.

= Some parts of my page aren't being transliterated =

Depending on the theme / plugins you're currently using, some content might be generated via javascript / ajax. This plugin works fully on the backend side (content is being transliterated via PHP), so it cannot influence JS generated content and content pulled via ajax calls.

Feel free to contact me via e-mail, and I'll see if I can assist you for your specific case.

== Screenshots ==

1. Plugin Settings page

2. Script Selector

3. WPML Language selector with cyrillic and latin scripts

== Changelog ==

= 2.0.1 =
Release date: March 22nd, 2020

Breaking changes:

* Complete plugin is namespaced, old functions can still be used without namespace, but they will throw **E_USER_DEPRECATED** error
* Shortcodes have been renamed, old shortcodes can still be used, but they will throw **E_USER_DEPRECATED** error
* Minimum WP version bumped to 4.8
* Minimum PHP version bumped to **7.0**

Improvements:

* Full PSR-1 and PSR-12 compatibility
* Full PSR-4 compatibility
* Huge performance increase over version 1.70 of SrbTransLatin and Version 1.4 of Serbian Latinisation
* Reworked the settings screen
* Reworked the entire shortcode functionality
* Moved Transliterator to a composer module, details can be found [here](https://github.com/seebeen/Transliterator)

Features:

* New Script Selector Widget
* New Script Selector function

Bug Fixes:

* Fixed transliteration not working when WPML is active
* Fixed buggy transliteration in certain scenarios
* Fixed issues with performance when using Avada Theme
* Fixed Shortcodes not behaving properly when WPML is active
* Fixed Memory leaks
* Fixed Performance issues on cerain hosting providers

== Upgrade Notice ==

When upgrading from

* SrbTransLatin 1.XX
* Serbian Latinisation 1.X.X

your options will be migrated from the old versions, please double check settings panel to see if everything is in order.

4 changes: 2 additions & 2 deletions srbtranslatin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: SrbTransLatin - Serbian Latinisation plugin allows you to have a website in both cyrillic and latin scripts
* Author: Sibin Grasic
* Author URI: https://sgi.io
* Version: 2.0
* Version: 2.0.1
* Requires at least: 4.8
* Requires PHP: 7.0
* Text Domain: SrbTransLatin
Expand All @@ -20,7 +20,7 @@
!defined(__NAMESPACE__ . '\FILE') && define(__NAMESPACE__ . '\FILE', __FILE__); // Define Main plugin file
!defined(__NAMESPACE__ . '\BASENAME') && define(__NAMESPACE__ . '\BASENAME', plugin_basename(FILE)); // Define Basename
!defined(__NAMESPACE__ . '\PATH') && define(__NAMESPACE__ . '\PATH', plugin_dir_path( FILE )); // Define internal path
!defined(__NAMESPACE__ . '\VERSION') && define (__NAMESPACE__ . '\VERSION', '2.0'); // Define internal version
!defined(__NAMESPACE__ . '\VERSION') && define (__NAMESPACE__ . '\VERSION', '2.0.1'); // Define internal version
!defined(__NAMESPACE__ . '\DOMAIN') && define (__NAMESPACE__ . '\DOMAIN', 'SrbTransLatin'); // Define Text domain

// Bootstrap the plugin
Expand Down

0 comments on commit 9ec4175

Please sign in to comment.