Skip to content

Conversation

@DylanDevelops
Copy link
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #34

Description

This pull request adds support for customizable currency codes in project configuration, allowing users to specify the currency symbol used for billing rates and earnings. The changes affect project setup, display of earnings and hourly rates, configuration file structure, and documentation. The most important updates are grouped below.

Feature: Currency Code Support

  • Added a currency field to the project configuration (Config struct and .tmporc files) to allow users to specify an ISO 4217 currency code for billing display (e.g., USD, EUR, GBP). If not set, it defaults to USD. [1] [2] [3]
  • Updated the project initialization flow (tmpo init) to prompt for currency code, validate input, and store it in the config. The display of hourly rate and earnings now uses the selected currency symbol. [1] [2] [3] [4]
  • All locations where earnings or rates are shown (manual entry, stats, etc.) now format amounts using the configured currency code. [1] [2] [3] [4] [5]

Configuration and API Changes

  • Updated the configuration template, loading, and creation logic to handle the new currency field, including a helper method to get the currency or default to USD. [1] [2] [3]
  • Modified tests to cover the new currency field in configuration creation and loading. [1] [2] [3] [4]

Documentation Updates

  • Expanded documentation to describe the new currency field, provide examples for multiple currencies, and update setup instructions to reflect currency support. [1] [2] [3] [4] [5] [6]

Introduces a new 'currency' field in project configuration, allowing users to specify the ISO 4217 currency code for billing rates and earnings display. Updates CLI commands, configuration handling, and documentation to support currency selection (defaulting to USD), and adds a new internal/currency package for formatting and validating currency codes. Includes comprehensive tests for currency formatting and config integration.
@DylanDevelops DylanDevelops merged commit 1c8959b into main Dec 24, 2025
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/additional-currency-support branch December 24, 2025 21:05
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.

Currency Localization Support

2 participants