Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add missing context for generic noun "Bottles" #3332

Closed
wants to merge 2 commits into from

Conversation

ryonakano
Copy link
Contributor

Description

This simple string "Bottles" is used in different contexts:

  • as a generic noun; referring to wine prefixes
  • as a proper noun, referring to the app name

Adding context allows us to add different translations for each context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Run meson setup builddir --prefix=/usr -Ddevel=true
  • Run ninja -C builddir
  • Run ninja -C builddir bottles-pot
  • Open po/bottles.pot and see the string "Bottles" in these two different contexts are registered as different texts:
1767 #: bottles/frontend/ui/list.blp:42 bottles/frontend/windows/main_window.py:200
1768 msgctxt "generic-noun"
1769 msgid "Bottles"
1770 msgstr ""
:

2831 #: data/com.usebottles.bottles.metainfo.xml.in:7
2832 msgid "Bottles"
2833 msgstr ""

This simple string "Bottles" is used in different contexts:

- as a generic noun; referring to wine prefixes
- as a proper noun, referring to the app name

Adding context allows us to add different translations for each context.
Copy link
Contributor

github-actions bot commented Apr 4, 2024

Pylint result on modfied files:
************* Module bottles.frontend.windows.main_window
bottles/frontend/windows/main_window.py:24:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/main_window.py:36:0: W0401: Wildcard import bottles.frontend.const (wildcard-import)
bottles/frontend/windows/main_window.py:38:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/windows/main_window.py:134:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:161:35: W0613: Unused argument 'status' (unused-argument)
bottles/frontend/windows/main_window.py:200:62: E0602: Undefined variable 'C_' (undefined-variable)
bottles/frontend/windows/main_window.py:178:41: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/main_window.py:284:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:288:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:292:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:299:28: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:303:29: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:306:33: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:309:30: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:309:44: W0613: Unused argument 'view' (unused-argument)
bottles/frontend/windows/main_window.py:324:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/frontend/windows/main_window.py:348:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/frontend/windows/main_window.py:363:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:379:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:386:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/windows/main_window.py:389:17: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:188:12: W0201: Attribute 'page_details' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:189:12: W0201: Attribute 'page_list' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:190:12: W0201: Attribute 'page_importer' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:191:12: W0201: Attribute 'page_library' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:55:0: R0904: Too many public methods (25/20) (too-many-public-methods)
bottles/frontend/windows/main_window.py:38:0: W0614: Unused import(s) APP_NAME, APP_NAME_LOWER, APP_VERSION, APP_ICON, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)

Copy link

fab-sonarqube bot commented Apr 4, 2024

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ryonakano ryonakano closed this Apr 4, 2024
@ryonakano
Copy link
Contributor Author

Superseded by #3333

@ryonakano ryonakano deleted the bottles-context branch April 4, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant