Carlos
Forum Replies Created
-
Hi Alex,
Thank you for your answer, I have version 2.5.5, which should be the latest.
Yet I do not see the ‘Fix broken HTML’ option in the Advanced tab under any sub-menu (Troubleshooting, Debug, Misc options, etc.). Maybe it was removed or renamed in the current version? Thank you.
Regards,
Carlos
- This reply was modified 1 year, 9 months ago by Carlos.
Just to add, currently I’m using Permalink Manager Lite BUT I have to manually modify the slug for each lesson. In addition, when using this plugin, it breaks the Lesson Focus mode in Sensei LMS, so I cannot use them together.
Thank you for your consideration.
CarlosHi,
I second the request for fetching names from people automatically. I just purchased the plugin and it is the first thing that popped up to me since all users are already registered and since avatars are being fetched, the first + last name must be somewhere there, too.
Thank you for your help!
Hi, it would also not hurt to mention that the function
pgc_sgb_plugin_frontend_scripts
is located under plugins/init.php file on circa row no.22.In addition, some may wonder how to find out what post type they are after. You can do so with the ‘Find My Custom Post Types’ plugin or use the built-in WP function called get_post_types().
Just to answer my own question, I was able to find the setting in Elementor for this element. However, on a mobile phone, the text comes out as it does not fit and it does not look good. The way I resolved it is that I restricted the Circle Infographic only to desktop and tablet and on a mobile phone, I have a different element (slider) instead. All good!
Just for completion, that piece of code was not actually working for me, so I modified it with a hard-coded rule that if the pattern in the URL is detected with the given language code, then strip the URL of the language code (e.g. yourdomain.com/ro/my-page is stripped to yourdomain.com/my-page).
However, this means that the user is shifted back to the original language and when they move onto another page that does provide translation, they need to use the language switcher again to change the language to the secondary language.
In this code to make it work, make sure to modify row no.36 with the secondary language. If you have more than one secondary languages, then it would be more complicated it won’t work.
<?php /** * Plugin Name: TranslatePress - Exclude URLs From Translation * Plugin URI: none * Description: A mini plugin for TranslatePress to exclude URL paths from translation * Version: 1.0 * Author: Carlos De Nirro * Author URI: none * License: GPL3 */ /* Copyright Janos Bakalaros (email : [email protected]) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // Start writing code after this line! add_action( 'plugins_loaded', 'trpc_exclude_tp_from_pages', -1 ); function trpc_exclude_tp_from_pages(){ $do_not_translate_path = array('quizzes'); foreach ( $do_not_translate_path as $path ){ if ( !empty($path) && strpos($_SERVER['REQUEST_URI'], untrailingslashit($path)) !== false ){ add_filter( 'trp_allow_tp_to_run', function(){return false; } ); $link = str_replace("cs/", "", $_SERVER['REQUEST_URI']); $_SERVER['REQUEST_URI'] = $link; } } }
- This reply was modified 4 years, 10 months ago by Carlos.
Hi Dragos,
Thank you, then I may use a third-party WordPress plugin to search and replace the items in the database. Thank you.
Hi Dragos,
Thank you for getting back to me. I decided not to exclude the URL in the end, as there were some elements on the website that I wanted to have translated.
This means, however, that the automatic translation ends up translating more than desired and then I need to go back to undo it.
So my question still stands – is there a particular table where automatic translation are stored in the DB? Or even better – some functionality to revert a particular page to the primary language? Thanks you.
Hi, in my case, the issue occurred when I was trying to manually translate part of the website that was actually a plugin text with variables.
Instead of using TranslatePress for the translation of the plugin, I used Loco translate (a free plugin that specializes in the translation of themes and plugins).
Adding the entire code with the mini-plugin
<?php /** * Plugin Name: Name Of The Plugin * Plugin URI: https://URI_Of_Page_Describing_Plugin_and_Updates * Description: A brief description of the Plugin. * Version: The Plugin's Version Number, e.g.: 1.0 * Author: Name Of The Plugin Author * Author URI: https://URI_Of_The_Plugin_Author * License: A "Slug" license name e.g. GPL2 */ /* Copyright YEAR PLUGIN_AUTHOR_NAME (email : PLUGIN AUTHOR EMAIL) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // Start writing code after this line! add_action( 'plugins_loaded', 'trpc_exclude_tp_from_pages', -1 ); function trpc_exclude_tp_from_pages(){ $do_not_translate_path = array('PART-OF-URL'); foreach ( $do_not_translate_path as $path ){ if ( !empty($path) && strpos($_SERVER['REQUEST_URI'], untrailingslashit($path)) !== false ){ add_filter( 'trp_allow_tp_to_run', function(){return false; } ); } } }
Apparently, this is possible by creating a mini-plugin (a function that will only run the plugin on the page if it is not in the listo f excluded URL/slugs:
– You can achieve this with custom code:
1) Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db
2) Add (and edit the arrays with your desired pages slug that you want to be excluded) the following code to the end of it:
add_action( ‘plugins_loaded’, ‘trpc_exclude_tp_from_pages’, -1 );
function trpc_exclude_tp_from_pages(){
$do_not_translate_path = array(‘contact’);
$do_not_translate_path = array(‘home’);
$do_not_translate_path = array(‘test-page-page’);foreach ( $do_not_translate_path as $path ){
if ( !empty($path) && strpos($_SERVER[‘REQUEST_URI’], untrailingslashit($path)) !== false ){
add_filter( ‘trp_allow_tp_to_run’, function(){return false; } );
}
}
}3) Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality.
Thank you for your kind answer, Alexandru from TranslatePress!
Marking as resolved.Forum: Plugins
In reply to: [Translate Multilingual sites - TranslatePress] Weird trp-gettext errorHi Hekcis,
In my experience, what helped was to add the words in the original language (for which TranslatePress was showing the error) into the list of Excluded strings under the Advanced tab (under the Gettext String, the Domain can be ignored).
Yours,
Janos