User tests: Successful: Unsuccessful:
Labels |
Added:
?
|
Title |
|
Easy | No | ⇒ | Yes |
Category | ⇒ | Installation Libraries |
Is it not possible that this could be committed as a special case with the hardcoded strings NOW and then updated to use jtext later?
Imho it's not urgent enough to make a special exception for that.
Suggest to use:
JText::sprintf('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02' . ' : %s => %s' , $src, $dest)
Could be changed later if required
Removed the space before the comma to make travis happy, sorry. Made a PR against yours.
What about the other JText::_ calls?
Like line 145 JLIB_FILESYSTEM_ERROR_COPY_FAILED
Hi Guys, how to test this ? thx
From what I understand you need to install an extension when having not enough file permissions in the components (or some folder that's needed as described in the link in the description) to move files into the directory. Before the patch you'll just see a message "Copy file failed" and after you'll see a message stating what the to and from directory are.
Status | Pending | ⇒ | Ready to Commit |
Thanks, - tested successfully - just the translations are missing
JLIB_FILESYSTEM_ERROR_WARNFS_ERR02 : /Applications/MAMP/tmp/php/phpLYx2kB => /Applications/MAMP/htdocs/joomla-cms-staging/tmp/com_patchtester.tar.bz2
RTC based on testing. Thanks
Labels |
Added:
?
|
Still requires a fix.
Status | Ready to Commit | ⇒ | Pending |
Moving back to Pending based on @phproberto's commet.
Labels |
Removed:
?
|
@davdebcom created pr to add sprintf to line 143
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
This does not work! : the constant is not translated.
the code should be:
diff --git a/libraries/joomla/filesystem/file.php b/libraries/joomla/filesystem/file.php
index cc14b9c..585be6a 100644
--- a/libraries/joomla/filesystem/file.php
+++ b/libraries/joomla/filesystem/file.php
@@ -141,5 +141,5 @@
if (!@ copy($src, $dest))
{
- JLog::add(JText::_('JLIB_FILESYSTEM_ERROR_COPY_FAILED'), JLog::WARNING, 'jerror');
+ JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_COPY_FAILED') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
return false;
@@ -520,5 +520,5 @@
else
{
- JLog::add(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02'), JLog::WARNING, 'jerror');
+ JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
}
}
@@ -539,5 +539,5 @@
else
{
- JLog::add(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02'), JLog::WARNING, 'jerror');
+ JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
}
}
$src, $dest), JLog::WARNING, 'jerror');
Evidently, as the variables and the hardcoding of =>
are not in the language string value, we will get weird results for a RTL Language:
If we want to also solve this we could do it this way:
if (JFactory::getLanguage()->isRTL())
{
JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %2$s <= %1$s', $src, $dest), JLog::WARNING, 'jerror');
}
else
{
JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
}
Status | Ready to Commit | ⇒ | Pending |
PR wrong, setting back to pending until corrected.
Labels |
Removed:
?
|
Added PR fixing translation and ltr by changing the messages in the language files.
Changed my PR according to instructions from @infograf768. @davdebcom needs to accept my PR if he agrees.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-04-02 17:06:53 |
Hi,
Thanks for introducing this improvement to the CMS!
Please use a language string rather than hardcoding strings so that they are translatable. Also as this will change language strings it will have to wait until after 3.4 release (as we are currently in a language freeze)