https://bugs.kde.org/show_bug.cgi?id=472605

            Bug ID: 472605
           Summary: lokalize creates .po in branch without a .pot in
                    templates when editing files in trunk
    Classification: Applications
           Product: lokalize
           Version: 23.04.3
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: sdepi...@gmail.com
          Reporter: freekdekru...@kde.nl
                CC: aa...@kde.org, sha...@ukr.net
  Target Milestone: ---

SUMMARY
***
lokalize creates .po in branch without a .pot in templates
***

STEPS TO REPRODUCE
1.  Start lokalize with a project file containing PoBaseDir, PotBaseDir and
BranchDir
2. Edit a .po file
3. 

OBSERVED RESULT
lokalize creates a .po with the same name in the BranchDir with a corresponding
.pot file in that directory

EXPECTED RESULT
lokalize should not create that .po file

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.4.3/5.27.6
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Questions in email:
I need more information about your setup:
1) Is there any bug report opened already? If not, it would be good to
do it.
2) Could you post your project file(s) from Lokalize? The one that you
open through the menu Project->Open project.
3) Do you use PO summit?
https://techbase.kde.org/Localization/Workflows/PO_Summit
4) Do those strange .po files in KF5 branch keeps reappearing to you, or
was it only a single occurrence?
5) Are your .po and .pot files stored on a network storage?
6) Is there any symlink directory anywhere in the path to your your
.po and .pot files?

In general, my change uses BranchDir and PotBaseDir to figure out if
respective .pot file in a branch exists and has no .po file, before it
creates the .po file. Code before me only looked for the .po file, and
if it didn't exist, it did nothing.

The code must have returned positive for the .pot
file because otherwise I pass an empty path to the .po creating function
which already accepted that path earlier, and haven't done anything
spurious.

I have a sub-folder vertalingen with a subfolder svn and in that sub-folder a
sub-folder trunkkf5 in which sub-folders nl and templates with respectively one
level lower the .po and .pot files.
In sub-folder vertalingen I have the project file KF5trunk.lokalize
Content:
[General]
BranchDir=svn/branchkf5/nl
GlossaryTbx=/home/freek/vertalingen/svn/trunkkf5/nl/woordenlijst.tbx
LangCode=nl
LanguageSource=Project
MailingList=kde-i18n...@kde.org
PoBaseDir=/home/freek/vertalingen/svn/trunkkf5/nl
PotBaseDir=svn/trunkkf5/templates
ProjectID=kde4-nl
TargetLangCode=nl

[RegExps]
WordWrap=74

Currently I have commented the line with BranchDir

In the email discussion I mentioned editing nl/messages/kstars/kstars.po and
nl/messages/kphotoalbum/
kphotoalbum.po in subfolder svn/trunkkf5/ which resulted in the same files in
svn/branchkf5, but these files do not have corresponding .pot files. I did not
pay much attention when committing these files, but the next day I inspected
the branchkf5 and noticed these strange files. That day I edited other .po
files and saw these files appear in branchkf5, but now I deleted these files
before adding and committing and commented out the line BranchDir in the
project file.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to