Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. pyside6-lupdate does not extract translations from Python files when given a directory
Qt 6.11 is out! See what's new in the release blog

pyside6-lupdate does not extract translations from Python files when given a directory

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 159 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Intolighter
    wrote last edited by
    #1

    This is my project: https://github.com/IntoLighter/S.T.A.L.K.E.R.-AI-Quest-Generator/tree/develop

    I want to localize my application. I'm trying to generate a .ts file by specifying the app directory:

    pyside6-lupdate app -ts main.ts
    

    But I get 0 source texts:

    Scanning directory 'app'...
    Updating 'main.ts'...
        Found 0 source text(s) (0 new and 0 already existing)
    

    However, if I specify an individual Python file, it works correctly:

    pyside6-lupdate app/src/main.py -ts main.ts
    
    Updating 'main.ts'...
        Found 1 source text(s) (1 new and 0 already existing)
    

    My Python files are located in app/src and its subdirectories.

    What am I missing? Is it possible to recursively scan a directory containing Python files with pyside6-lupdate? What is the recommended way to generate a single .ts file from multiple Python files?

    1 Reply Last reply
    0
    • Nils SjobergN Offline
      Nils SjobergN Offline
      Nils Sjoberg
      wrote last edited by
      #2

      You need to pass all the .py files in the directory to pyside6-lupdate, or use pyside6-project lupdate.

      "What's up, Doc?"

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved