class documentation

class Command(BaseCommand):

View In Hierarchy

Undocumented

Method add​_arguments Entry point for subclassed commands to add custom arguments.
Method build​_potfiles Build pot files and apply msguniq to them.
Method copy​_plural​_forms Copy plural forms header contents from a Django catalog of locale to the msgs string, inserting it at the right place. msgs should be the contents of a newly created .po file.
Method find​_files Get all files in the given root. Also check that there is a matching locale dir for each file.
Method handle The actual logic of the command. Subclasses must implement this method.
Method process​_files Group translatable files by locale directory and run pot file build process for each group.
Method process​_locale​_dir Extract translatable literals from the specified files, creating or updating the POT file for a given locale directory.
Method remove​_potfiles Undocumented
Method write​_po​_file Create or update the PO file for self.domain and locale. Use contents of the existing potfile.
Class Variable help Undocumented
Class Variable requires​_system​_checks Undocumented
Instance Variable default​_locale​_path Undocumented
Instance Variable domain Undocumented
Instance Variable extensions Undocumented
Instance Variable ignore​_patterns Undocumented
Instance Variable invoked​_for​_django Undocumented
Instance Variable keep​_pot Undocumented
Instance Variable locale​_paths Undocumented
Instance Variable msgattrib​_options Undocumented
Instance Variable msgmerge​_options Undocumented
Instance Variable msguniq​_options Undocumented
Instance Variable no​_obsolete Undocumented
Instance Variable symlinks Undocumented
Instance Variable verbosity Undocumented
Instance Variable xgettext​_options Undocumented
Property gettext​_version Undocumented
Property settings​_available Undocumented

Inherited from BaseCommand:

Method __init__ Undocumented
Method add​_base​_argument Call the parser's add_argument() method, suppressing the help text according to BaseCommand.suppressed_base_arguments.
Method check No summary
Method check​_migrations Print a warning if the set of migrations on disk don't match the migrations in the database.
Method create​_parser Create and return the ArgumentParser which will be used to parse the arguments to this command.
Method execute Try to execute this command, performing system checks if needed (as controlled by the requires_system_checks attribute, except if force-skipped).
Method get​_version Return the Django version, which should be correct for all built-in Django commands. User-supplied commands can override this method to return their own version.
Method print​_help Print the help message for this command, derived from self.usage().
Method run​_from​_argv No summary
Class Variable base​_stealth​_options Undocumented
Class Variable output​_transaction Undocumented
Class Variable requires​_migrations​_checks Undocumented
Class Variable stealth​_options Undocumented
Class Variable suppressed​_base​_arguments Undocumented
Instance Variable ​_called​_from​_command​_line Undocumented
Instance Variable stderr Undocumented
Instance Variable stdout Undocumented
Instance Variable style Undocumented
def add_arguments(self, parser):
Entry point for subclassed commands to add custom arguments.
def build_potfiles(self):
Build pot files and apply msguniq to them.
def copy_plural_forms(self, msgs, locale):
Copy plural forms header contents from a Django catalog of locale to the msgs string, inserting it at the right place. msgs should be the contents of a newly created .po file.
def find_files(self, root):
Get all files in the given root. Also check that there is a matching locale dir for each file.
def handle(self, *args, **options):
The actual logic of the command. Subclasses must implement this method.
def process_files(self, file_list):
Group translatable files by locale directory and run pot file build process for each group.
def process_locale_dir(self, locale_dir, files):

Extract translatable literals from the specified files, creating or updating the POT file for a given locale directory.

Use the xgettext GNU gettext utility.

def remove_potfiles(self):

Undocumented

def write_po_file(self, potfile, locale):

Create or update the PO file for self.domain and locale. Use contents of the existing potfile.

Use msgmerge and msgattrib GNU gettext utilities.

help: str =
requires_system_checks: list =
default_locale_path =

Undocumented

domain =

Undocumented

extensions =

Undocumented

ignore_patterns =

Undocumented

invoked_for_django: bool =

Undocumented

keep_pot =

Undocumented

locale_paths =

Undocumented

msgattrib_options =

Undocumented

msgmerge_options =

Undocumented

msguniq_options =

Undocumented

no_obsolete =

Undocumented

symlinks =

Undocumented

verbosity =

Undocumented

xgettext_options =

Undocumented

@cached_property
gettext_version =

Undocumented

@cached_property
settings_available =

Undocumented