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

v1.12.1 #377

Merged
merged 7 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .run/debug.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration name="debug" default="false" factoryName="Flutter"
type="FlutterRunConfigurationType">
<option name="additionalArgs" value="--no-enable-impeller" />
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method v="2" />
</configuration>
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# 1.12.1 - 2025-01-29

### Added

- Chinese Traditional translation

### Changed

- Enable automatic export by default
- Background of the notes tiles is slightly darker (like the tiles in the search view)
- Print logs to the console in release mode

### Fixed

- Custom font not applied to lists in the editor

## 1.12.0 - 2025-01-12

### Added
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Simple, local, material design notes.
All the supported languages are listed here alphabetically. You can see more details on the [Crowdin project](https://crowdin.com/project/localmaterialnotes). To improve a language or add support for a new one, please see [CONTRIBUTING.md](CONTRIBUTING.md#localization).

- Chinese Simplified
- Chinese Traditional
- Czech
- English
- French
Expand All @@ -106,7 +107,7 @@ The JSON import feature only supports JSON files created by the application. Scr
> [!CAUTION]
> Pre-release versions can be buggy. Some features may not work. You might even loose all your data. That's why they are only meant to be installed manually, after making a backup from the settings.

Pre-release versions of the application are available on [GitHub releases](https://github.com/maelchiotti/LocalMaterialNotes/releases). You can filter by pre-releases only by typing `prerelease:true` in the search box.
Pre-release versions of the application are available on [GitHub releases](https://github.com/maelchiotti/LocalMaterialNotes/releases?q=prerelease:true). You can filter by pre-releases only by typing `prerelease:true` in the search box.

When using a pre-release version, please report any issue you encounter in the discussion linked to that pre-release.

Expand Down
4 changes: 2 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
### Localizations

- [ ] Update the localizations from [Crowdin](https://crowdin.com/project/localmaterialnotes)
- [ ] Update the [README.md](README.md) supported languages
- [ ] Update the [localizations completion](lib/common/enums/localization_completion.dart)
- [ ] Update the [supported languages](lib/common/enums/supported_language.dart)
- [ ] Update the [README.md](README.md) list of supported languages

### Screenshots

Expand Down
10 changes: 10 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/260.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ADDED
- Chinese Traditional translation

CHANGED
- Enable automatic export by default
- Background of the notes tiles is slightly darker (like the tiles in the search view)
- Print logs to the console in release mode

FIXED
- Custom font not applied to lists in the editor
10 changes: 10 additions & 0 deletions fastlane/metadata/android/fr-FR/changelogs/260.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AJOUTÉ
- Traduction en chinois traditionnel

MODIFIÉ
- Activation des exports automatiques par défault
- L'arrière-plan des tuiles de notes est légèrement plus foncé (comme les tuiles de la vue de recherche)
- Logs affichés dans la console en production

CORRIGÉ
- Police personnalisée non appliquée dans l'éditeur
1 change: 1 addition & 0 deletions fastlane/metadata/android/id-ID/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p><b>Material Notes</b> is a text-based note-taking application, aimed at simplicity. It embraces Material Design. It stores the notes locally and doesn't have any internet permissions, so you are the only one that can access the notes.</p><p><b>Take notes</b></p><ul><li>Write text notes (title and content)</li><li>Take advantage of the advanced formatting options, including checklists</li><li>Undo and redo your changes while editing</li><li>Use the quick action from your home screen to quickly add a note</li></ul><p><b>Organize</b></p><ul><li>Search though your notes</li><li>Sort your notes by date or title, in ascending or descending order</li><li>Display your notes in a list or a grid view</li><li>Pin your notes</li><li>Recover your deleted notes from the bin</li></ul><p><b>Share & backup</b></p><ul><li>Share text from other applications to add it directly to a note</li><li>Share your notes as text</li><li>Export your notes as JSON, manually or automatically, and import them back</li><li>Export your notes as Markdown</li></ul><p><b>Protect</b></p><ul><li>Never worry about how your data is handled: it cannot leave your device as the application doesn't have any internet permissions</li><li>Encrypt your JSON exports</li></ul><p><b>Customize</b></p><ul><li>Choose your language</li><li>Choose your theme (light, dark or black)</li><li>Choose if you want your theme to be dynamic (use colors from your background)</li><li>Choose if you want to enable the advanced formatting, only the checklists or keep your notes basic</li></ul>
1 change: 1 addition & 0 deletions fastlane/metadata/android/id-ID/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Simple, local, material design notes
1 change: 1 addition & 0 deletions fastlane/metadata/android/id-ID/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Material Notes
1 change: 1 addition & 0 deletions fastlane/metadata/android/zh-TW/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p><b>Material Notes</b> 乃一款以文字為本的筆記應用程式,秉承簡約之風,擁抱 Material 設計。 筆記於本機儲存,並不索取任何網際網路權限,只有您可以存取筆記。</p><p><b>記事</b></p><ul><li>撰寫文字筆記 (標題與內容)</li><li>善用進階格式設定選項,包括核選清單</li><li>編輯時復原及重做您的變更</li><li>從您的主畫面使用快速動作以便快速新增筆記</li></ul><p><b>整理</b></p><ul><li>搜尋您的筆記</li><li>按日期或標題、順序或倒序排序您的筆記</li><li>以清單或網格檢視顯示您的筆記</li><li>釘選您的筆記</li><li>從垃圾桶還原您已刪除的筆記</li></ul><p><b>分享與備份</b></p><ul><li>從其他應用程式分享文字,並直接新增至筆記</li><li>以文字形式分享您的筆記</li><li>手動或自動將您的筆記匯出成 JSON,以便日後可重新匯入</li><li>將您的筆記匯出成 Markdown</li></ul><p><b>保護</b></p><ul><li>不必擔心您的資料如何處理:應用程式沒有任何網際網路權限, 故數據不能流出您的裝置</li><li>加密您的 JSON 匯出</li></ul><p><b>自訂</b></p><ul><li>自選您的語言</li><li>自選您的佈景主題 (淺色、深色或黑色)</li><li>選擇是否使用動態佈景主題 (從您的背景選用色彩)</li><li>選擇是否啟用進階格式設定、僅限核選清單又或者讓您的筆記保持基本</li></ul>
55 changes: 55 additions & 0 deletions fastlane/metadata/android/zh-TW/full_description.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
full_description: |
<p>
<b>Material Notes</b> 乃一款以文字為本的筆記應用程式,秉承簡約之風,擁抱 Material 設計。
筆記於本機儲存,並不索取任何網際網路權限,只有您可以存取筆記。
</p>

<p>
<b>記事</b>
</p>
<ul>
<li>撰寫文字筆記 (標題與內容)</li>
<li>善用進階格式設定選項,包括核選清單</li>
<li>編輯時復原及重做您的變更</li>
<li>從您的主畫面使用快速動作以便快速新增筆記</li>
</ul>

<p>
<b>整理</b>
</p>
<ul>
<li>搜尋您的筆記</li>
<li>按日期或標題、順序或倒序排序您的筆記</li>
<li>以清單或網格檢視顯示您的筆記</li>
<li>釘選您的筆記</li>
<li>從垃圾桶還原您已刪除的筆記</li>
</ul>

<p>
<b>分享與備份</b>
</p>
<ul>
<li>從其他應用程式分享文字,並直接新增至筆記</li>
<li>以文字形式分享您的筆記</li>
<li>手動或自動將您的筆記匯出成 JSON,以便日後可重新匯入</li>
<li>將您的筆記匯出成 Markdown</li>
</ul>

<p>
<b>保護</b>
</p>
<ul>
<li>不必擔心您的資料如何處理:應用程式沒有任何網際網路權限,
故數據不能流出您的裝置</li>
<li>加密您的 JSON 匯出</li>
</ul>

<p>
<b>自訂</b>
</p>
<ul>
<li>自選您的語言</li>
<li>自選您的佈景主題 (淺色、深色或黑色)</li>
<li>選擇是否使用動態佈景主題 (從您的背景選用色彩)</li>
<li>選擇是否啟用進階格式設定、僅限核選清單又或者讓您的筆記保持基本</li>
</ul>
1 change: 1 addition & 0 deletions fastlane/metadata/android/zh-TW/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
簡單易用、本機操作、Material 設計之筆記
1 change: 1 addition & 0 deletions fastlane/metadata/android/zh-TW/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Material Notes
6 changes: 3 additions & 3 deletions integration_test/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:localmaterialnotes/app.dart';
import 'package:localmaterialnotes/common/constants/constants.dart';
import 'package:localmaterialnotes/common/preferences/preferences_utils.dart';
import 'package:localmaterialnotes/common/system/flag_secure_utils.dart';
import 'package:localmaterialnotes/common/system/info_utils.dart';
import 'package:localmaterialnotes/common/ui/theme_utils.dart';
import 'package:localmaterialnotes/navigation/navigation_routes.dart';
import 'package:localmaterialnotes/pages/bin/bin_page.dart';
import 'package:localmaterialnotes/pages/settings/settings_main_page.dart';
import 'package:localmaterialnotes/services/backup/auto_backup_service.dart';
import 'package:localmaterialnotes/services/labels/labels_service.dart';
import 'package:localmaterialnotes/services/notes/notes_service.dart';
import 'package:localmaterialnotes/utils/flag_secure_utils.dart';
import 'package:localmaterialnotes/utils/info_utils.dart';
import 'package:localmaterialnotes/utils/theme_utils.dart';
import 'package:patrol/patrol.dart';
import 'package:shared_preferences/shared_preferences.dart';

Expand Down
1 change: 1 addition & 0 deletions l10n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ format: true
use-escaping: true
nullable-getter: false
synthetic-package: false
required-resource-attributes: true

arb-dir: lib/l10n/translations
template-arb-file: app_en.arb
Expand Down
12 changes: 7 additions & 5 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ import 'package:back_button_interceptor/back_button_interceptor.dart';
import 'package:dynamic_color/dynamic_color.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'common/actions/labels/select.dart';
import 'common/actions/notes/select.dart';
import 'common/constants/constants.dart';
import 'common/enums/supported_language.dart';
import 'common/extensions/locale_extension.dart';
import 'common/localization/locale_utils.dart';
import 'common/system/quick_actions_utils.dart';
import 'common/system/share_utils.dart';
import 'common/ui/theme_utils.dart';
import 'common/widgets/placeholders/error_placeholder.dart';
import 'l10n/app_localizations/app_localizations.g.dart';
import 'pages/notes/notes_page.dart';
import 'providers/labels/labels_list/labels_list_provider.dart';
import 'providers/labels/labels_navigation/labels_navigation_provider.dart';
import 'providers/notifiers/notifiers.dart';
import 'providers/preferences/preferences_provider.dart';
import 'utils/locale_utils.dart';
import 'utils/quick_actions_utils.dart';
import 'utils/share_utils.dart';
import 'utils/theme_utils.dart';

/// MaterialNotes application.
class App extends ConsumerStatefulWidget {
Expand Down Expand Up @@ -134,7 +136,7 @@ class _AppState extends ConsumerState<App> with AfterLayoutMixin<App> {
darkTheme: darkTheme,
themeMode: themeMode,
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
supportedLocales: SupportedLanguage.locales,
locale: LocaleUtils().appLocale,
debugShowCheckedModeBanner: false,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/common/actions/notes/copy.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/services.dart';

import '../../../models/note/note.dart';
import '../../../utils/snack_bar_utils.dart';
import '../../constants/constants.dart';
import '../../ui/snack_bar_utils.dart';

/// Copies the content of the [note] to the clipboard.
Future<void> copyNote({required Note note}) async {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/actions/notes/labels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import '../../../pages/editor/dialogs/labels_selection_dialog.dart';
import '../../../providers/labels/labels_list/labels_list_provider.dart';
import '../../../providers/notes/notes_provider.dart';
import '../../../providers/notifiers/notifiers.dart';
import '../../../utils/snack_bar_utils.dart';
import '../../constants/constants.dart';
import '../../ui/snack_bar_utils.dart';
import 'select.dart';

/// Asks the user to select the labels for the [note].
Expand Down
2 changes: 1 addition & 1 deletion lib/common/constants/notes.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../../models/note/note.dart';
import '../../utils/localizations_utils.dart';
import '../localization/localizations_utils.dart';

/// Note displayed on the very first run of the application to welcome the user.
final welcomeNote = RichTextNote(
Expand Down
3 changes: 2 additions & 1 deletion lib/common/dialogs/confirmation_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';

import '../constants/constants.dart';
import '../preferences/enums/confirmations.dart';
import '../../utils/keys.dart';
import '../widgets/keys.dart';

/// Shows the confirmation dialog to ask the user for a confirmation on an action.
///
Expand Down
60 changes: 0 additions & 60 deletions lib/common/enums/localization_completion.dart

This file was deleted.

64 changes: 64 additions & 0 deletions lib/common/enums/supported_language.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import 'package:dart_helper_utils/dart_helper_utils.dart';
import 'package:flutter/material.dart';
import 'package:locale_names/locale_names.dart';

/// Languages supported by the application.
enum SupportedLanguage {
/// Czech.
cs(Locale('cs'), 1),

/// English.
en(Locale('en'), 1),

/// Spanish.
es(Locale('es'), .97),

/// French.
fr(Locale('fr'), 1),

/// German.
de(Locale('de'), .97),

/// Hindi.
hi(Locale('hi'), .80),

/// Italian.
it(Locale('it'), .99),

/// Polish.
pl(Locale('pl'), .61),

/// Portuguese.
pt(Locale('pt'), .62),

/// Russian.
ru(Locale('ru'), .88),

/// Turkish.
tr(Locale('tr'), .80),

/// Chinese Simplified.
zh(Locale('zh'), 1),

/// Chinese Traditional.
zhTW(Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), 0),
;

/// The locale completion of this language.
final Locale locale;

/// The translation completion of this language.
final num completion;

/// A language supported by the application with its [locale] and its translation [completion].
const SupportedLanguage(this.locale, this.completion);

/// Returns the list of [locale] supported by the application.
static List<Locale> locales = values.map((language) => language.locale).toList();

/// Returns the native name of this language.
String get nativeName => locale.nativeDisplayLanguage.capitalizeFirstLetter;

/// Returns the translation completion of this language formatted as a percentage according to the [locale].
String get completionFormatted => completion.formatAsPercentage(locale: locale.languageCode);
}
3 changes: 2 additions & 1 deletion lib/common/extensions/locale_extension.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'dart:ui';

import 'package:intl/intl.dart' as intl;
import '../../utils/locale_utils.dart';

import '../localization/locale_utils.dart';

/// Extends the [Locale] class with some utilities functions.
extension LocaleExtension on Locale {
Expand Down
File renamed without changes.
Loading