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

Translate /services/index.md, Ember 5.11 #266

Open
BlueCutOfficial opened this issue Oct 4, 2024 · 0 comments
Open

Translate /services/index.md, Ember 5.11 #266

BlueCutOfficial opened this issue Oct 4, 2024 · 0 comments
Labels
Guides FR trad File from the Ember Guides to translate in French

Comments

@BlueCutOfficial
Copy link
Member

Please assign yourself to the issue or let a comment at the very moment you start the translation.

File: guides/services/index.md
From Ember: 5.4
To Ember: 5.11

In the snippet below, you can see what changes were done in the latest English documentation. The purpose of this issue is to adjust the French translation to match the new version:

diff --git a/guides/services/index.md b/guides/services/index.md
index e9daa7e42..59d2627b8 100644
--- a/guides/services/index.md
+++ b/guides/services/index.md
@@ -33,22 +33,22 @@ Like any Ember object, a service is initialized and can have properties and meth
 Below, the shopping cart service manages an items array that represents the items currently in the shopping cart.
 
 javascript {data-filename=app/services/shopping-cart.js}
-import { A } from '@ember/array';
+import { TrackedArray } from 'tracked-built-ins';
 import Service from '@ember/service';
 
 export default class ShoppingCartService extends Service {
-  items = A([]);
+  items = new TrackedArray([]);
 
   add(item) {
-    this.items.pushObject(item);
+    this.items.push(item);
   }
 
-  remove(item) {
-    this.items.removeObject(item);
+  remove(item) 
+    this.items.splice(this.items.indexOf(item), 1);
   }
 
   empty() {
-    this.items.clear();
+    this.items.splice(0, this.items.length);
   }
 }
 
@BlueCutOfficial BlueCutOfficial added the Guides FR trad File from the Ember Guides to translate in French label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Guides FR trad File from the Ember Guides to translate in French
Projects
None yet
Development

No branches or pull requests

1 participant